freebsd-dev/sys/x86/xen
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
..
hvm.c xen: implement the privcmd user-space device 2014-10-22 17:07:20 +00:00
pv.c loader: fix the size of MODINFOMD_MODULEP 2015-01-20 12:28:24 +00:00
pvcpu_enum.c xen: notify ACPI about SCI override 2014-12-09 11:12:24 +00:00
xen_apic.c Add x2APIC support. Enable it by default if CPU is capable. The 2015-02-09 21:00:56 +00:00
xen_intr.c xen/intr: balance dynamic interrupts across available vCPUs 2014-12-10 13:25:21 +00:00
xen_msi.c msi: add Xen MSI implementation 2014-09-30 16:46:45 +00:00
xen_nexus.c Fix warning about possible use of uninitialized variable. 2015-01-02 08:42:44 +00:00
xen_pci_bus.c xen: create a new PCI bus override 2014-12-09 18:03:25 +00:00
xenpv.c xen: convert the Grant-table code to a NewBus device 2014-12-10 11:35:41 +00:00