x86/vvmx: add hvm_intsrc_vector support to nvmx_intr_intercept()
authorSergey Dyasli <sergey.dyasli@citrix.com>
Wed, 20 Sep 2017 15:17:21 +0000 (17:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 20 Sep 2017 15:17:21 +0000 (17:17 +0200)
commit41d1fcb1c9bf7134cd00b3689f311353d4e2f541
treeabcb804b5b89f8b3409e2e51dcd44eea9ba72aff
parent64cf3181e4d469a8bd7e7dee8ff2d3bf5b45f4b0
x86/vvmx: add hvm_intsrc_vector support to nvmx_intr_intercept()

Under the following circumstances:

    1. L1 doesn't enable PAUSE exiting or PAUSE-loop exiting controls
    2. L2 executes PAUSE in a loop with RFLAGS.IE == 0

L1's PV IPI through event channel will never reach the target L1's vCPU
which runs L2 because nvmx_intr_intercept() doesn't know about
hvm_intsrc_vector. This leads to infinite L2 loop without nested
vmexits and can cause L1 to hang.

The issue is easily reproduced with Qemu/KVM on CentOS-7-1611 as L1
and an L2 guest with SMP.

Fix nvmx_intr_intercept() by injecting hvm_intsrc_vector irq into L1
which will cause nested vmexit.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/intr.c