freebsd-dev/sys/amd64/vmm
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
..
amd Add macro to identify AVIC capability (advanced virtual interrupt controller) 2015-01-24 00:35:49 +00:00
intel Simplify instruction restart logic in bhyve. 2015-01-18 03:08:30 +00:00
io Replace bhyve's minimal RTC emulation with a fully featured one in vmm.ko. 2014-12-30 22:19:34 +00:00
vmm_dev.c Simplify instruction restart logic in bhyve. 2015-01-18 03:08:30 +00:00
vmm_host.c - Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the 2014-05-27 19:04:38 +00:00
vmm_host.h Add virtualized XSAVE support to bhyve which permits guests to use XSAVE and 2014-02-08 16:37:54 +00:00
vmm_instruction_emul.c MOVS instruction emulation. 2015-01-19 06:53:31 +00:00
vmm_ioport.c Fix typo (missing comma). 2015-01-14 07:18:51 +00:00
vmm_ioport.h Change the type of the first argument to the I/O emulation handlers to 2014-10-26 19:03:06 +00:00
vmm_ipi.c Move <machine/apicvar.h> to <x86/apicvar.h>. 2014-01-23 20:10:22 +00:00
vmm_ipi.h Don't expose 'vmm_ipinum' as a global. 2014-01-09 03:25:54 +00:00
vmm_ktr.h Add emulation of the "outsb" instruction. NetBSD guests use this to write to 2014-05-23 05:15:17 +00:00
vmm_lapic.c Local APIC access via 32-bit naturally-aligned loads is merely 2014-04-15 17:06:26 +00:00
vmm_lapic.h Roll back botched partial MFC :( 2014-02-04 05:03:14 +00:00
vmm_mem.c Merge projects/bhyve_npt_pmap into head. 2013-10-05 21:22:35 +00:00
vmm_mem.h Merge projects/bhyve_npt_pmap into head. 2013-10-05 21:22:35 +00:00
vmm_stat.c Get rid of unused stat VMM_HLT_IGNORED. 2014-09-21 18:52:56 +00:00
vmm_stat.h Get rid of unused stat VMM_HLT_IGNORED. 2014-09-21 18:52:56 +00:00
vmm_support.S Add x2APIC support. Enable it by default if CPU is capable. The 2015-02-09 21:00:56 +00:00
vmm_util.c
vmm_util.h
vmm.c Simplify instruction restart logic in bhyve. 2015-01-18 03:08:30 +00:00
x86.c Don't advertise the "OS visible workarounds" feature in cpuid.80000001H:ECX. 2014-10-19 21:38:58 +00:00
x86.h Allow CPUID leaf 0xD to be read as zeroes. 2013-09-06 05:16:10 +00:00