x86/vvmx: don't enable interrupt window when using virt intr delivery
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 5 Feb 2020 12:50:46 +0000 (13:50 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 5 Feb 2020 12:50:46 +0000 (13:50 +0100)
If virtual interrupt delivery is used to inject the interrupt to the
guest the interrupt window shouldn't be enabled, as the interrupt is
already injected using the GUEST_INTR_STATUS vmcs field.

Reported-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/intr.c

index 2eaf3f8d36fd7b834268048ee8410a28886aa76c..49a1295f09e584785c3fc871ff7c23dc990eb604 100644 (file)
@@ -209,7 +209,7 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
                 if ( unlikely(intack.source != hvm_intsrc_none) )
                     vmx_enable_intr_window(v, intack);
             }
-            else
+            else if ( !cpu_has_vmx_virtual_intr_delivery )
                 vmx_enable_intr_window(v, intack);
 
             return 1;