summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* MFC 317786sephe2017-05-121-6/+7
| | | | | | | | | pcicfg: Fix direct calls of pci_cfg{read,write} on systems w/o PCI host bridge. Reported by: dexuan@ Reviewed by: jhb@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10564
* MFC 313564:jhb2017-05-108-8/+0
| | | | | | | | | | | | | Drop the "created from" line from files generated by makesyscalls.sh. This information is less useful when the generated files are included in source control along with the source. If needed it can be reconstructed from the $FreeBSD$ tag in the generated file. Removing this information from the generated output permits committing the generated files along with the change to the system call master list without having inconsistent metadata in the generated files. Regenerate the affected files along with the MFC.
* MFC r315361 and r315364: Hide MONITORX/MWAITX from guests.grehan2017-03-251-0/+3
| | | | | | | | | | | | | | r315361 Add the AMD MONITORX/MWAITX feature definition introduced in Bulldozer/Ryzen CPUs. r315364 Hide the AMD MONITORX/MWAITX capability. Otherwise, recent Linux guests will use these instructions, resulting in #UD exceptions since bhyve doesn't implement MONITOR/MWAIT exits. This fixes boot-time hangs in recent Linux guests on Ryzen CPUs (and probably Bulldozer aka AMD FX as well).
* MFC r303464 (by brooks@):dchagin2017-03-112-10/+0
| | | | | | | | Don't create pointless backups of generated files in "make sysent". Any sensible workflow will include a revision control system from which to restore the old files if required. In normal usage, developers just have to clean up the mess.
* MFC r314429:kib2017-03-071-0/+1
| | | | Initialize pcb_save for thread0.
* MFC r283291: don't use CALLOUT_MPSAFE with callout_init()avg2017-03-041-1/+1
| | | | | The main purpose of this MFC is to reduce conflicts for other merges. Parts of the original change have already "trickled down" via individual MFCs.
* MFC r312954:kib2017-02-051-11/+34
| | | | | Do not leave stale 4K TLB entries on pde (superpage) removal or protection change.
* MFC r289894:kib2017-02-033-14/+50
| | | | | | | | CLFLUSH does not need barriers, the instruction is ordered WRT other writes. Use CLFLUSHOPT when available. MFC r312555: Use SFENCE for ordering CLFLUSHOPT.
* MFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0avg2017-01-301-1/+1
|
* MFC r312699:tijl2017-01-271-10/+5
| | | | | | | | | Apply r210555 to 64 bit linux support: The interpreter name should no longer be treated as a buffer that can be overwritten. PR: 216346
* MFC r303583:mjg2016-12-311-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.
* MFC 308820,308821: Fixes for fatal page faults on x86.jhb2016-12-231-2/+2
| | | | | | | | | | | | | | | | | | | 308820: Report page faults due to reserved bits in PTEs as a separate fault type. Rather than reporting a page fault due to a bad PTE as a protection violation with the "rsv" flag, treat these faults as a separate type of fault altogether. 308821: MFamd64: Various fatal page fault fixes. - If a page fault is triggered due to reserved bits in a PTE, treat it as a fatal fault and panic. - If PG_NX is in use, report whether a fatal page fault is due to an instruction fetch or a data access. - If a fatal page fault is due to reserved bits in a PTE, report that as the page fault type rather than a protection violation.
* MFC r310205:kib2016-12-211-1/+1
| | | | Fix typo.
* MFC 303753,308004: Add bounds checking on addresses used with /dev/mem.jhb2016-12-022-3/+15
| | | | | | | | | | | 303753: Don't permit mappings of invalid physical addresses on amd64 via /dev/mem. 308004: MFamd64: Add bounds checks on addresses used with /dev/mem. Reject attempts to read from or memory map offsets in /dev/mem that are beyond the maximum-supported physical address of the current CPU.
* MFC r307903,307904,308039,308050: vmm/svm: iopm_bitmap and msr_bitmapavg2016-11-081-4/+5
| | | | must be contiguous in physical memory
* MFC r305539: work around AMD erratum 793 for family 16h, models 00h-0Fhavg2016-10-271-0/+14
|
* Merge r307936:glebius2016-10-251-1/+4
| | | | | | | | | The argument validation in r296956 was not enough to close all possible overflows in sysarch(2). Submitted by: Kun Yang <kun.yang chaitin.com> Patch by: kib Security: SA-16:15
* 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: Fix various issues with PCI pass through and VT-d.jhb2016-09-304-22/+31
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r305939:kib2016-09-211-1/+1
| | | | Remove trailing space.
* 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
* 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 302181,302635: Disable MSI-X migration on older Xen hypervisors.jhb2016-08-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 302181: Add a tunable to disable migration of MSI-X interrupts. The new 'machdep.disable_msix_migration' tunable can be set to 1 to disable migration of MSI-X interrupts. Xen versions prior to 4.6.0 do not properly handle updates to MSI-X table entries after the initial write. In particular, the operation to unmask a table entry after updating it during migration is not propagated to the "real" table for passthrough devices causing the interrupt to remain masked. At least some systems in EC2 are affected by this bug when using SRIOV. The tunable can be set in loader.conf as a workaround. 302635: xen: automatically disable MSI-X interrupt migration If the hypervisor version is smaller than 4.6.0. Xen commits 74fd00 and 70a3cb are required on the hypervisor side for this to be fixed, and those are only included in 4.6.0, so stay on the safe side and disable MSI-X interrupt migration on anything older than 4.6.0. It should not cause major performance degradation unless a lot of MSI-X interrupts are allocated.
* MFC r302517:dchagin2016-07-174-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. MFC r302518, r302626: Add linux_mmap.c to the appropriate conf/files.
* Regen for r302962 (Linux personality), record mergeinfo for r320516.dchagin2016-07-1710-14/+14
|
* MFC r302515:dchagin2016-07-172-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.
* MFC 301015sephe2016-06-241-1/+0
| | | | | | | | hyperv/vmbus: Rename ISR functions MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6601
* MFC 299912sephe2016-06-231-0/+38
| | | | | | | | atomic: Add testandclear on i386/amd64 Reviewed by: kib Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6381
* MFC 297931,298022sephe2016-06-213-17/+1
| | | | | | | | | | | | | | | | | | | | | 297931 Expose doreti as a global symbol on amd64 and i386. doreti provides the common code path for returning from interrupt andlers on x86. Exposing doreti as a global symbol allows kernel modules to include low-level interrupt handlers instead of requiring all low-level handlers to be statically compiled into the kernel. Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: kib 298022 hyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus Submitted by: Jun Su <junsu microsoft com> Reviewed by: jhb, kib, sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5910
* MFC r301853:kib2016-06-201-15/+10
| | | | Do not access pv_table array for fictitious pages.
* MFC r301457:kib2016-06-121-4/+7
| | | | Avoid spurious EINVAL in amd64 pmap_change_attr().
* MFC r300415:dchagin2016-06-051-7/+1
| | | | Add macro to convert errno and use it when appropriate.
* MFC r300359, r300360:dchagin2016-06-056-24/+24
| | | | | Correct an argument param of linux_sched_* system calls as a struct l_sched_param does not defined due to it's nature.
* MFC r299249:dchagin2016-05-231-0/+32
| | | | | Add a forgotten in r283424 .eh_frame section with CFI & FDE records to allow stack unwinding through signal handler.
* MFC r300305, r300332:kib2016-05-231-2/+4
| | | | Check for overflow and return EINVAL if detected. Use unsigned index.
* MFC r298737: fix up r300036avg2016-05-171-0/+1
|
* MFC r298736: ensure that initial local apic id is sane on AMD 10h systemsavg2016-05-171-0/+13
|
* MFC r299350:kib2016-05-171-2/+6
| | | | Add locking annotations to amd64 struct md_page members.
* MFC r297857: re-enable AMD Topology extension on certain models ifavg2016-05-042-2/+2
| | | | disabled by BIOS
* MFC r297243: Polish wbwd(4) driver and add more supported chips.mav2016-05-031-1/+0
|
* MFC r298482:pfg2016-04-263-3/+3
| | | | | | Cleanup redundant parenthesis from existing howmany()/roundup() macro uses. Requested by: dchagin
* MFC r297846: [amd64] dtrace_invop handler is to be called only foravg2016-04-261-0/+2
| | | | kernel exceptions
* MFC r294526:hselasky2016-04-071-0/+1
| | | | | | | Add missing atomic wrapper macro. Reviewed by: alfred @ Sponsored by: Mellanox Technologies
* MFC r297062:dchagin2016-03-275-7/+29
| | | | Regen for r297061 (fstatfs64 Linux syscall).
* MFC r297061;dchagin2016-03-272-2/+1
| | | | | | | Implement fstatfs64 system call. PR: 181012 Submitted by: John Wehle
* Merge r296956:glebius2016-03-161-2/+2
| | | | | | | | | | Due to invalid use of a signed intermediate value in the bounds checking during argument validity verification, unbound zero'ing of the process LDT and adjacent memory can be initiated from usermode. Submitted by: CORE Security Patch by: kib Security: SA-16:15
* MFC r296908:kib2016-03-161-3/+4
| | | | Force the desired alignment of the user save area.
* MFC r295966:kib2016-03-091-0/+1
| | | | | | Return dst as the result from memcpy(9) on amd64. PR: 207422
OpenPOWER on IntegriCloud