]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vlapic code restructuring to make it easy to support hardware-assist for APIC
authorneel <neel@FreeBSD.org>
Wed, 25 Dec 2013 06:46:31 +0000 (06:46 +0000)
committerneel <neel@FreeBSD.org>
Wed, 25 Dec 2013 06:46:31 +0000 (06:46 +0000)
commit0c91ef8145cb2d4090accd731fafb4e98da2a46c
tree7c26297e63fee10a7fbabe8f0dba16c34086f60f
parent258c0be375414a2ecddb9f8db57bb16625ef7ca0
vlapic code restructuring to make it easy to support hardware-assist for APIC
emulation.

The vlapic initialization and cleanup is done via processor specific vmm_ops.
This will allow the VT-x/SVM modules to layer any hardware-assist for APIC
emulation or virtual interrupt delivery on top of the vlapic device model.

Add a parameter to 'vcpu_notify_event()' to distinguish between vlapic
interrupts versus other events (e.g. NMI). This provides an opportunity to
use hardware-assists like Posted Interrupts (VT-x) or doorbell MSR (SVM)
to deliver an interrupt to a guest without causing a VM-exit.

Get rid of lapic_pending_intr() and lapic_intr_accepted() and use the
vlapic_xxx() counterparts directly.

Associate an 'Apic Page' with each vcpu and reference it from the 'vlapic'.
The 'Apic Page' is intended to be referenced from the Intel VMCS as the
'virtual APIC page' or from the AMD VMCB as the 'vAPIC backing page'.
sys/amd64/include/vmm.h
sys/amd64/vmm/amd/amdv.c
sys/amd64/vmm/intel/vmx.c
sys/amd64/vmm/intel/vmx.h
sys/amd64/vmm/io/vlapic.c
sys/amd64/vmm/io/vlapic.h
sys/amd64/vmm/io/vlapic_priv.h [new file with mode: 0644]
sys/amd64/vmm/vmm.c
sys/amd64/vmm/vmm_lapic.c
sys/amd64/vmm/vmm_lapic.h