]> xenbits.xensource.com Git - people/dariof/xen.git/commit
vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address
authorHaozhong Zhang <haozhong.zhang@intel.com>
Thu, 15 Dec 2016 10:11:20 +0000 (11:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Dec 2016 10:11:20 +0000 (11:11 +0100)
commitac6a4500b2bed47fa135afbf8e4caeb4b3df546d
tree0ff9ffb83651fd5d8dafacacc4628c13ca2b3b17
parent9864841914c25c7028a12b81c7b61151482c1cf3
vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address

nvmx_handle_vmxon() previously checks whether a vcpu is in VMX
operation by comparing its vmxon_region_pa with GPA 0. However, 0 is
also a valid VMXON region address. If L1 hypervisor had set the VMXON
region address to 0, the check in nvmx_handle_vmxon() will be skipped.
Fix this problem by using an invalid VMXON region address for vcpu
out of VMX operation.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/hvm/vmx/vvmx.h