aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@Intel.com>2013-08-27 15:28:16 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-27 15:28:16 +0200
commit863b772fd95228938fbf80e311779045230ccfd4 (patch)
treee51b33140a5cf581a4367ed2ec318f84ed0521da
parent3e22a868bafcdea79c61741a08703ab2b0e7315b (diff)
downloadxen-863b772fd95228938fbf80e311779045230ccfd4.tar.gz
xen-863b772fd95228938fbf80e311779045230ccfd4.tar.bz2
xen-863b772fd95228938fbf80e311779045230ccfd4.zip
Nested VMX: Force check ISR when L2 is running
External interrupt is allowed to notify CPU only when it has higher priority than current in servicing interrupt. With APIC-v, the priority comparing is done by hardware and hardware will inject the interrupt to VCPU when it recognizes an interrupt. Currently, there is no virtual APIC-v feature available for L1 to use, so when L2 is running, we still need to compare interrupt priority with ISR in hypervisor instead via hardware. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Acked-by: "Dong, Eddie" <eddie.dong@intel.com> master commit: b35d0a26983843c092bfa353fd6b9aa8c3bf4886 master date: 2013-08-22 10:50:13 +0200
-rw-r--r--xen/arch/x86/hvm/vlapic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index f3fdab9e67..7ea0475000 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -37,6 +37,7 @@
#include <asm/hvm/io.h>
#include <asm/hvm/support.h>
#include <asm/hvm/vmx/vmx.h>
+#include <asm/hvm/nestedhvm.h>
#include <public/hvm/ioreq.h>
#include <public/hvm/params.h>
@@ -1035,7 +1036,8 @@ int vlapic_has_pending_irq(struct vcpu *v)
if ( irr == -1 )
return -1;
- if ( vlapic_virtual_intr_delivery_enabled() )
+ if ( vlapic_virtual_intr_delivery_enabled() &&
+ !nestedhvm_vcpu_in_guestmode(v) )
return irr;
isr = vlapic_find_highest_isr(vlapic);