summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable/10' into develdevelRenato Botelho2017-02-231-0/+2
|\
| * MFC r290101 (by hselasky):kib2017-02-101-0/+2
| | | | | | | | | | | | Build fix for i386/XBOX and pc98/GENERIC. Reported by: ngie
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2017-02-096-39/+100
|\ \ | |/
| * MFC r313109:kib2017-02-093-13/+6
| | | | | | | | Use ANSI definitions for some i386 functions.
| * MFC r312954:kib2017-02-051-9/+41
| | | | | | | | | | Do not leave stale 4K TLB entries on pde (superpage) removal or protection change.
| * MFC r289894:kib2017-02-033-17/+53
| | | | | | | | | | | | | | | | CLFLUSH does not need barriers, the instruction is ordered WRT other writes. Use CLFLUSHOPT when available. MFC r312555: Use SFENCE for ordering CLFLUSHOPT.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2017-01-091-1/+15
|\ \ | |/
| * MFC 308820,308821: Fixes for fatal page faults on x86.jhb2016-12-231-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-12-053-14/+33
|\ \ | |/
| * MFC 303753,308004: Add bounds checking on addresses used with /dev/mem.jhb2016-12-022-4/+23
| | | | | | | | | | | | | | | | | | | | | | 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 307975: Enable EFER_NXE properly on APs.jhb2016-11-231-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EFER_NXE is set in the EFER MSR by initializecpu() and must be set on all CPUs in the system. When PG_NX support was added to PAE on i386, the block to enable EFER_NXE was placed in a section of initializecpu() that only runs if 'cpu == CPU_686'. During early boot, locore does an initial pass to set cpu that sets it to CPU_686 on all CPUs later than a Pentium. Later, printcpuinfo() adjusts the 'cpu' variable on PII and later CPUs to one of CPU_PII, CPU_PIII, or CPU_P4. However, printcpuinfo() is called after initializecpu() on the BSP, so the BSP would enable EFER_NXE and pg_nx. The APs execute initializecpu() much later after printcpuinfo() has run. The end result on a modern CPU was that cpu was set to CPU_PIII when the APs invoked initializecpu(), so they did not enable EFER_NXE. As a result, the APs would fault when trying to access any pages marked with PG_NX set. When booting a 2 CPU PAE kernel in bhyve this manifested as a hang before single user mode. The attempt to execute /bin/init tried to copy out the exec strings (argv, etc.) to a non-executable mapping while running on the AP. The instruction kept faulting due to invalid bits in the PTE in an infinite loop. Fix this by moving the code to enable EFER_NXE out of the switch statement on 'cpu' and always doing it if 'amd_feature' supports AMDID_NX.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-10-121-1/+1
|\ \ | |/
| * MFC: r306318tijl2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html PR: 212639 Submitted by: wheelcomplex@gmail.com
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-09-121-1/+2
|\ \ | |/
| * 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/10' into develRenato Botelho2016-08-172-4/+4
|\ \ | |/
| * MFC r303913:kib2016-08-171-2/+2
| | | | | | | | | | Unconditionally perform checks that FPU region was entered, when #NM exception is caught in kernel mode.
| * MFC 302900,302902,302921,303461,304009:jhb2016-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mask of optional ptrace() events. 302900: Add a test for user signal delivery. This test verifies we get the correct ptrace event details when a signal is posted to a traced process from userland. 302902: Add a mask of optional ptrace() events. ptrace() now stores a mask of optional events in p_ptevents. Currently this mask is a single integer, but it can be expanded into an array of integers in the future. Two new ptrace requests can be used to manipulate the event mask: PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK sets the current event mask. The current set of events include: - PTRACE_EXEC: trace calls to execve(). - PTRACE_SCE: trace system call entries. - PTRACE_SCX: trace syscam call exits. - PTRACE_FORK: trace forks and auto-attach to new child processes. - PTRACE_LWP: trace LWP events. The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS. The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for compatibility but now simply toggle corresponding flags in the event mask. While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both modify the event mask and continue the traced process. 302921: Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL. 303461: Note that not all optional ptrace events use SIGTRAP. New child processes attached due to PTRACE_FORK use SIGSTOP instead of SIGTRAP. All other ptrace events use SIGTRAP. 304009: Remove description of P_FOLLOWFORK as this flag was removed.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-08-081-0/+2
|\ \ | |/
| * 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.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-07-199-202/+13
|\ \ | |/
| * MFC r302573:kib2016-07-181-2/+2
| | | | | | | | Fill tf_trapno for trap frames created for syscall.
| * MFC r302517:dchagin2016-07-172-192/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-175-7/+7
| |
| * MFC r302515:dchagin2016-07-171-1/+1
| | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'origin/stable/10' into develLuiz Otavio O Souza2016-06-302-1/+26
|\ \ | |/
| * 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/+26
| | | | | | | | | | | | | | | | atomic: Add testandclear on i386/amd64 Reviewed by: kib Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6381
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-06-213-20/+1
|\ \ | |/
| * MFC 297931,298022sephe2016-06-213-20/+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
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-06-064-19/+13
|\ \ | |/
| * MFC r300415:dchagin2016-06-051-7/+1
| | | | | | | | Add macro to convert errno and use it when appropriate.
| * MFC r300359, r300360:dchagin2016-06-053-12/+12
| | | | | | | | | | Correct an argument param of linux_sched_* system calls as a struct l_sched_param does not defined due to it's nature.
* | Merge remote-tracking branch 'origin/stable/10' into develLuiz Otavio O Souza2016-05-231-2/+4
|\ \ | |/
| * MFC r300305, r300332:kib2016-05-231-2/+4
| | | | | | | | Check for overflow and return EINVAL if detected. Use unsigned index.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-05-093-3/+3
|\ \ | |/
| * MFC r298890:kib2016-05-081-1/+1
| | | | | | | | | | | | Make it explicit that D_MEM cdevsw d_flag is to signify that the driver is (or behaves identically to) /dev/mem. Remove the D_MEM flag from random drivers.
| * MFC r297857: re-enable AMD Topology extension on certain models ifavg2016-05-042-2/+2
| | | | | | | | disabled by BIOS
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-05-031-1/+0
|\ \ | |/
| * MFC r297243: Polish wbwd(4) driver and add more supported chips.mav2016-05-031-1/+0
| |
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-04-281-1/+1
|\ \ | |/
| * MFC r298482:pfg2016-04-261-1/+1
| | | | | | | | | | | | Cleanup redundant parenthesis from existing howmany()/roundup() macro uses. Requested by: dchagin
* | Merge remote-tracking branch 'origin/stable/10' into develLuiz Otavio O Souza2016-03-307-9/+30
|\ \ | |/
| * 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 remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-03-171-3/+4
|\ \ | |/
| * MFC r296908:kib2016-03-161-3/+4
| | | | | | | | Force the desired alignment of the user save area.
* | Remove ixgbe from wrap kernelsRenato Botelho2016-02-262-2/+0
| |
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-02-031-5/+6
|\ \ | |/
| * MFC r294311:kib2016-02-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear whole XMM register file instead of only XMM0. Also clear x87 registers. This brings amd64 on par with i386, providing consistent initial FPU state. PR: 206370 MFC r294312: Use ANSI definitions. Wrap long line. MFC r294313: Adjust i386 comment to match amd64 one after r294311. Approved by: re (gjb)
OpenPOWER on IntegriCloud