freebsd-dev/sys/i386
Konstantin Belousov 4c918926cd Add x2APIC support. Enable it by default if CPU is capable. The
hw.x2apic_enable tunable allows disabling it from the loader prompt.

To closely repeat effects of the uncached memory ops when accessing
registers in the xAPIC mode, the x2APIC writes to MSRs are preceeded
by mfence, except for the EOI notifications.  This is probably too
strict, only ICR writes to send IPI require serialization to ensure
that other CPUs see the previous actions when IPI is delivered.  This
may be changed later.

In vmm justreturn IPI handler, call doreti_iret instead of doing iretd
inline, to handle corner conditions.

Note that the patch only switches LAPICs into x2APIC mode. It does not
enables FreeBSD to support > 255 CPUs, which requires parsing x2APIC
MADT entries and doing interrupts remapping, but is the required step
on the way.

Reviewed by:	neel
Tested by:	pho (real hardware), neel (on bhyve)
Discussed with:	jhb, grehan
Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
2015-02-09 21:00:56 +00:00
..
acpica Correct a comment brought over from amd64. i386 doesn't use long 2014-08-12 18:22:57 +00:00
bios Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
conf Remove "New" label from NFSCL/NFSD now that they are the only NFS 2015-01-06 16:15:57 +00:00
i386 Add x2APIC support. Enable it by default if CPU is capable. The 2015-02-09 21:00:56 +00:00
ibcs2 Remove the no-at variants of the kern_xx() syscall helpers. E.g., we 2014-11-13 18:01:51 +00:00
include Add x2APIC support. Enable it by default if CPU is capable. The 2015-02-09 21:00:56 +00:00
isa Improve support for XSAVE with debuggers. 2014-11-21 20:53:17 +00:00
linux Regen after r276508, r276509. 2015-01-01 18:43:31 +00:00
pci Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
svr4 MFamd64: Move extern declaration of _ucodesel and _udatasel to 2014-11-02 21:40:32 +00:00
xbox After r261980, the local ptr variable in xbox_init() is no longer used, 2014-02-16 22:48:36 +00:00
xen Generalized parts of the XEN timer code into a generic pvclock 2015-02-04 08:26:43 +00:00
Makefile