x86/vvmx: Unconditionally initialise vmxon_region_pa during vcpu construction
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 25 Oct 2018 13:40:11 +0000 (14:40 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 30 Oct 2018 13:26:21 +0000 (13:26 +0000)
commit18cef4df8f8bd04a59a218e5f67e7896e43fd07d
treeb4a1de4ab7f8629da3f7b2999aaf7d8eca686168
parent6faff8f9005d685185cd3f4ed116bf45d7d1553f
x86/vvmx: Unconditionally initialise vmxon_region_pa during vcpu construction

This is a stopgap solution until the toolstack side of initialisation can be
sorted out, but it does result in the nvmx_vcpu_in_vmx() predicate working
correctly even when nested virt hasn't been enabled for the domain.

Update nvmx_handle_vmx_insn() to include the in-vmx mode check (for all
instructions other than VMXON) to complete the set of #UD checks.

In addition, sanity check that the nested vmexit handler has worked correctly,
and that we are only providing emulation of the VT-x instructions to L1
guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vvmx.c