]> xenbits.xensource.com Git - xen.git/commit
x86/vvmx: don't enable vmcs shadowing for nested guests
authorSergey Dyasli <sergey.dyasli@citrix.com>
Mon, 23 Oct 2017 09:33:02 +0000 (10:33 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Dec 2017 19:03:27 +0000 (19:03 +0000)
commit19fdb8e258619aea265af9c183e035e545cbc2d2
treeb0f60713022748228c9af711ebfe9cec54dd6d55
parent26f9a18485b5daf5215c8032a3049821c374b148
x86/vvmx: don't enable vmcs shadowing for nested guests

Running "./xtf_runner vvmx" in L1 Xen under L0 Xen produces the
following result on H/W with VMCS shadowing:

    Test: vmxon
    Failure in test_vmxon_in_root_cpl0()
      Expected 0x8200000f: VMfailValid(15) VMXON_IN_ROOT
           Got 0x82004400: VMfailValid(17408) <unknown>
    Test result: FAILURE

This happens because SDM allows vmentries with enabled VMCS shadowing
VM-execution control and VMCS link pointer value of ~0ull. But results
of a nested VMREAD are undefined in such cases.

Fix this by not copying the value of VMCS shadowing control from vmcs01
to vmcs02.

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