summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-10-0612-75/+889
|\
| * MFC r306097:kib2016-10-053-0/+629
| | | | | | | | | | | | | | | | | | | | | | | | | | Add kernel interfaces to call EFI Runtime Services. MFC r306104: Fix build of the module outside the kernel tree. MFC r306209 (by imp): Change the efi_get_table interface to a void **. MFC r306351: Handle TLB shootdown IPI during the EFI runtime calls, on SandyBridges.
| * MFC r306350:kib2016-10-031-1/+29
| | | | | | | | | | | | For machines which support PCID but not have INVPCID instruction, i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() and invltlb_pcid_handler().
| * MFC r305213,305319,305398alc2016-10-011-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | As an optimization to the machine-independent layer, change the machine- dependent pmap_ts_referenced() so that it updates the page's dirty field if a modified bit is found while counting reference bits. This opportunistic update can be performed at low cost and can eliminate the need for some future calls to pmap_is_modified() by the machine- independent layer. Replace the number 4 in sparc64's pmap_ts_referenced() by PMAP_TS_REFERENCED_MAX, like we've done elsewhere, e.g., amd64.
| * MFC 305502: Reset PCI pass through devices via PCI-e FLR during VM start/end.jhb2016-09-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add routines to trigger a function level reset (FLR) of a PCI-express device via the PCI-express device control register. This also includes support routines to wait for pending transactions to complete as well as calculating the maximum completion timeout permitted by a device. Change the ppt(4) driver to reset pass through devices before attaching to a VM during startup and before detaching from a VM during shutdown. Sponsored by: Chelsio Communications
| * MFC 304858,305485,305497: Fix various issues with PCI pass through and VT-d.jhb2016-09-304-22/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 304858: Enable I/O MMU when PCI pass through is first used. Rather than enabling the I/O MMU when the vmm module is loaded, defer initialization until the first attempt to pass a PCI device through to a guest. If the I/O MMU fails to initialize or is not present, than fail the attempt to pass a PCI device through to a guest. The hw.vmm.force_iommu tunable has been removed since the I/O MMU is no longer enabled during boot. However, the I/O MMU support can be disabled by setting the hw.vmm.iommu.enable tunable to 0 to prevent use of the I/O MMU on any systems where it is buggy. 305485: Leave ppt devices in the host domain when they are not attached to a VM. This allows a pass through device to be reset to a normal device driver on the host and reused on the host. ppt devices are now always active in some I/O MMU domain when the I/O MMU is active, either the host domain or the domain of a VM they are attached to. 305497: Update the I/O MMU in bhyve when PCI devices are added and removed. When the I/O MMU is active in bhyve, all PCI devices need valid entries in the DMAR context tables. The I/O MMU code does a single enumeration of the available PCI devices during initialization to add all existing devices to a domain representing the host. The ppt(4) driver then moves pass through devices in and out of domains for virtual machines as needed. However, when new PCI devices were added at runtime either via SR-IOV or HotPlug, the I/O MMU tables were not updated. This change adds a new set of EVENTHANDLERS that are invoked when PCI devices are added and deleted. The I/O MMU driver in bhyve installs handlers for these events which it uses to add and remove devices to the "host" domain. Sponsored by: Chelsio Communications
| * MFC r306092:kib2016-09-281-2/+2
| | | | | | | | Rename efi_systbl to efi_systbl_phys.
| * MFC r306091:kib2016-09-281-0/+42
| | | | | | | | | | | | Add a way for the architecture to specify the calling ABI for methods in the EFI Runtime Services Table. On amd64, the calling conventions are MS.
| * MFC r306088:kib2016-09-281-0/+33
| | | | | | | | Add amd64 functions to load/store GDT register, store IDT and TR registers.
| * MFC r306087:kib2016-09-282-15/+27
| | | | | | | | | | Export the pmap_cache_bits() and pmap_pinit_pml4() functions from the amd64 pmap.
| * MFC r306020:kib2016-09-273-34/+34
| | | | | | | | Move pmap_p*e_index() inline functions from pmap.c to pmap.h.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-09-264-17/+59
|\ \ | |/
| * MFC r305942:kib2016-09-251-3/+0
| | | | | | | | Consolidate four efi_next_descriptor() definitions.
| * MFC r305692:kib2016-09-253-14/+59
| | | | | | | | Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-09-231-1/+1
|\ \ | |/
| * MFC r305939:kib2016-09-211-1/+1
| | | | | | | | Remove trailing space.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-09-122-2/+3
|\ \ | |/
| * MFC 303713: Correct assertion on vcpuid argument to vm_gpa_hold().jhb2016-09-091-1/+1
| | | | | | | | PR: 208168
| * MFC 304637: Fix build for !SMP kernels after the Xen MSIX workaround.jhb2016-09-091-1/+2
| | | | | | | | | | | | | | Move msix_disable_migration under #ifdef SMP since it doesn't make sense for !SMP kernels. PR: 212014
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-08-251-1/+1
|\ \ | |/
| * MFC r302783:badger2016-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add explicit detection of KVM hypervisor Set vm_guest to a new enum value (VM_GUEST_KVM) when kvm is detected and use vm_guest in conditionals testing for KVM. Also, fix a conditional checking if we're running in a VM which caught only the generic VM case, but not more specific VMs (KVM, VMWare, etc.). (Spotted by: vangyzen). Sponsored by: Dell Inc. Approved by: vangyzen (mentor)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-08-173-5/+19
|\ \ | |/
| * MFC r303913:kib2016-08-171-2/+2
| | | | | | | | | | Unconditionally perform checks that FPU region was entered, when #NM exception is caught in kernel mode.
| * MFC r302835: fix-up for configuration of AMD Family 10h processorsavg2016-08-151-0/+14
| | | | | | | | borrowed from Linux
| * MFC r303958:kib2016-08-141-3/+3
| | | | | | | | | | The pmap_delayed_invl_wait() function blocks on turnstile, it does not spin, in the committed version. Remove stray '*' in the text.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-08-122-220/+3
|\ \ | |/
| * MFC r303583:mjg2016-08-111-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | amd64: implement pagezero using rep stos The current implementation uses non-temporal writes. This turns out to be detrimental to performance if the page is used shortly after, which is the typical case with page faults. Switch to rep stos. Approved by: re (gjb)
| * MFC r303712:kib2016-08-101-210/+0
| | | | | | | | | | | | Merge i386 and amd64 variants of mp_watchdog.c into x86/. Approved by: re (gjb)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-07-1919-414/+40
|\ \ | |/
| * MFC r302517:dchagin2016-07-184-360/+7
| | | | | | | | | | | | | | | | | | | | | | Fix a copy/paste bug introduced during X86_64 Linuxulator work. FreeBSD support NX bit on X86_64 processors out of the box, for i386 emulation use READ_IMPLIES_EXEC flag, introduced in r302515. While here move common part of mmap() and mprotect() code to the files in compat/linux to reduce code dupcliation between Linuxulator's Approved by: re (gjb)
| * MFC r302516:dchagin2016-07-1810-14/+28
| | | | | | | | | | | | Regen for r302515 (Linux personality). Approved by: re (gjb)
| * MFC r302515:dchagin2016-07-182-2/+2
| | | | | | | | | | | | | | | | | | | | Implement Linux personality() system call mainly due to READ_IMPLIES_EXEC flag. In Linux if this flag is set, PROT_READ implies PROT_EXEC for mmap(). Linux/i386 set this flag automatically if the binary requires executable stack. READ_IMPLIES_EXEC flag will be used in the next Linux mmap() commit. Approved by: re (gjb)
| * MFC r302635:royger2016-07-151-0/+2
| | | | | | | | | | | | xen: automatically disable MSI-X interrupt migration Approved by: re (kib)
| * Remove GENERIC-NODEBUG kernel configurations, missed duringgjb2016-07-141-38/+0
| | | | | | | | | | | | | | | | | | the stable/11 branch. This is a direct commit to stable/11. Approved by: re (kib) Sponsored by: The FreeBSD Foundation
| * MFC r302448:ed2016-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't forget to set sa->narg for CloudABI system calls. It turns out that this value is not used within the system call code under normal conditions, except when using tracing tools like ktrace. If we forget to set this value, it is set to random garbage. This may cause ktrace to hang indefinitely, making it impossible to kill. Approved by: re@ Reported by: Michael Plass PR: 210800
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-07-082-10/+1
|\ \ | |/
| * - Remove debugging from GENERIC* kernel configurationsgjb2016-07-081-9/+0
| | | | | | | | | | | | | | | | | | - Enable MALLOC_PRODUCTION - Default dumpdev=NO - Remove UPDATING entry regarding debugging features Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
| * Replace a number of conflations of mp_ncpus and mp_maxid with eithernwhitehorn2016-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mp_maxid or CPU_FOREACH() as appropriate. This fixes a number of places in the kernel that assumed CPU IDs are dense in [0, mp_ncpus) and would try, for example, to run tasks on CPUs that did not exist or to allocate too few buffers on systems with sparse CPU IDs in which there are holes in the range and mp_maxid > mp_ncpus. Such circumstances generally occur on systems with SMT, but on which SMT is disabled. This patch restores system operation at least on POWER8 systems configured in this way. There are a number of other places in the kernel with potential problems in these situations, but where sparse CPU IDs are not currently known to occur, mostly in the ARM machine-dependent code. These will be fixed in a follow-up commit after the stable/11 branch. PR: kern/210106 Reviewed by: jhb Approved by: re (glebius)
* | Merge remote-tracking branch 'origin/master' into devel-11Luiz Otavio O Souza2016-07-022-25/+15
|\ \ | |/
| * Update comments for the MD functions managing contexts for newkib2016-06-162-25/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | threads, to make it less confusing and using modern kernel terms. Rename the functions to reflect current use of the functions, instead of the historic KSE conventions: cpu_set_fork_handler -> cpu_fork_kthread_handler (for kthreads) cpu_set_upcall -> cpu_copy_thread (for forks) cpu_set_upcall_kse -> cpu_set_upcall (for new threads creation) Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) Differential revision: https://reviews.freebsd.org/D6731
* | Merge remote-tracking branch 'origin/master' into devel-11Renato Botelho2016-06-141-15/+10
|\ \ | |/
| * Do not access pv_table array for fictitious pages, since the arraykib2016-06-131-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | does not cover the dynamically registered ficititious ranges, and fictitious pages mappings are not promoted. Offer a dummy struct md_page to fetch constant superpage pv list generation to satisfy logic. Also, by initializing the pv_dummy pv_list to empty, we can remove several explicit PG_FICTITIOUS tests. Reported and tested by: Michael Butler <imb@protected-networks.net> (previous version) Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D6728 Approved by: re (hrs)
* | Merge remote-tracking branch 'origin/master' into devel-11Renato Botelho2016-06-061-4/+7
|\ \ | |/
| * Avoid spurious EINVAL in amd64 pmap_change_attr().kib2016-06-051-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Do not try to change attributes for DMAP when working on a mapping which is not covered by the DMAP. This was reported on real system where a BAR of a device (NTB) was mapped outside the PCI window. Reported and tested by: mav Reviewed by: jhb, mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D6668
* | Merge remote-tracking branch 'origin/master' into devel-11Luiz Otavio O Souza2016-05-272-1/+5
|\ \ | |/
| * In pmap_advise(), avoid leaking DI start for EPT pmaps which needs A/Dkib2016-05-272-1/+5
| | | | | | | | | | | | | | emulation. Assert that syscalls do not leak DI. Reported by: gjb Sponsored by: The FreeBSD Foundation
* | Merge remote-tracking branch 'origin/master' into devel-11Luiz Otavio O Souza2016-05-271-16/+15
|\ \ | |/
| * Both Clang and GCC cannot generate efficient reserve_pv_entries().jkim2016-05-251-16/+15
| | | | | | | | | | | | | | | | | | | | | | http://docs.freebsd.org/cgi/mid.cgi?552BFEB2.8040407 Re-implement it entirely in inline assembly not to let compilers do silly spilling to memory. For non-POPCNT case, use newly added bit_count(3). Reported by: alc Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D6541
* | Merge remote-tracking branch 'origin/master' into devel-11Renato Botelho2016-05-251-0/+1
|\ \ | |/
| * Document POPCNT erratum for 6th Generation Intel Core processors.jkim2016-05-231-0/+1
| |
OpenPOWER on IntegriCloud