aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@Intel.com>2013-08-22 10:49:24 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-22 10:49:24 +0200
commit7fb5c6b9ef22915e3fcac95cd44857f4457ba783 (patch)
treec7db5d5e3bc70e6ba014da6f5909bc047b1df518 /xen/arch/x86/hvm
parentc9c6abab583d27fdca1d979a7f1d18ae30f54e9b (diff)
downloadxen-7fb5c6b9ef22915e3fcac95cd44857f4457ba783.tar.gz
xen-7fb5c6b9ef22915e3fcac95cd44857f4457ba783.tar.bz2
xen-7fb5c6b9ef22915e3fcac95cd44857f4457ba783.zip
Nested VMX: Check whether interrupt is blocked by TPR
If interrupt is blocked by L1's TPR, L2 should not see it and keep running. Adding the check before L2 to retrive interrupt. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Acked-by: "Dong, Eddie" <eddie.dong@intel.com>
Diffstat (limited to 'xen/arch/x86/hvm')
-rw-r--r--xen/arch/x86/hvm/vmx/intr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index e376f3c4ee..cab91094f4 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -165,6 +165,11 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
{
u32 ctrl;
+ /* If blocked by L1's tpr, then nothing to do. */
+ if ( nestedhvm_vcpu_in_guestmode(v) &&
+ hvm_interrupt_blocked(v, intack) == hvm_intblk_tpr )
+ return 1;
+
if ( nvmx_intr_blocked(v) != hvm_intblk_none )
{
enable_intr_window(v, intack);