]> xenbits.xensource.com Git - xen.git/commit
Nested VMX: Update APIC-v(RVI/SVI) when vmexit to L1
authorYang Zhang <yang.z.zhang@Intel.com>
Thu, 22 Aug 2013 08:59:01 +0000 (10:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Aug 2013 08:59:01 +0000 (10:59 +0200)
commit84e6af58707520baf59c1c86c29237419e439afb
tree7895c5efbad165a8424933af8ff93a6d187a3c05
parent375a1035002fb257087756a86e6caeda649fc0f1
Nested VMX: Update APIC-v(RVI/SVI) when vmexit to L1

If enabling APIC-v, all interrupts to L1 are delivered through APIC-v.
But when L2 is running, external interrupt will casue L1 vmexit with
reason external interrupt. Then L1 will pick up the interrupt through
vmcs12. when L1 ack the interrupt, since the APIC-v is enabled when
L1 is running, so APIC-v hardware still will do vEOI updating. The problem
is that the interrupt is delivered not through APIC-v hardware, this means
SVI/RVI/vPPR are not setting, but hardware required them when doing vEOI
updating. The solution is that, when L1 tried to pick up the interrupt
from vmcs12, then hypervisor will help to update the SVI/RVI/vPPR to make
sure the following vEOI updating and vPPR updating corrently.

Also, since interrupt is delivered through vmcs12, so APIC-v hardware will
not cleare vIRR and hypervisor need to clear it before L1 running.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Acked-by: "Dong, Eddie" <eddie.dong@intel.com>
xen/arch/x86/hvm/irq.c
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/hvm/vmx/intr.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/hvm/vlapic.h
xen/include/asm-x86/hvm/vmx/vmx.h
xen/include/asm-x86/hvm/vmx/vvmx.h