x86/vvmx: fix virtual interrupt injection when Ack on exit control is used
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 5 Feb 2020 12:49:09 +0000 (13:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 5 Feb 2020 12:49:09 +0000 (13:49 +0100)
commitf96e1469ad06b61796c60193daaeb9f8a96d7458
tree022ec823733f5c6ec8461524408d08e3b09bbe9f
parent0729830cc425a8ff27a3137e87b93768ae3c853c
x86/vvmx: fix virtual interrupt injection when Ack on exit control is used

When doing a virtual vmexit (ie: a vmexit handled by the L1 VMM)
interrupts shouldn't be injected using the virtual interrupt delivery
mechanism unless the Ack on exit vmexit control bit isn't set in the
nested vmcs.

Gate the call to nvmx_update_apicv helper on whether the nested vmcs
has the Ack on exit bit set in the vmexit control field.

Note that this fixes the usage of x2APIC by the L1 VMM, at least when
the L1 VMM is Xen.

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