x86/vvmx: add a shadow vmcs check to vmlaunch

Intel SDM states that if the current VMCS is a shadow VMCS,
VMFailInvalid occurs and control passes to the next instruction.

Implement such behaviour for nested vmlaunch.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
Sergey Dyasli authored and Jan Beulich committed 2017-03-14 12:25:47 +01:00
1 parent dc05c0ceeb
commit b22ee98c4e
1 file changed
+7
+7
View File
@@ -1630,6 +1630,13 @@ int nvmx_handle_vmlaunch(struct cpu_user_regs *regs)
return X86EMUL_OKAY;
}
/* Check that guest is not using a shadow vmcs for vmentry */
if ( nvmx->shadow_vmcs )
{
vmfail_invalid(regs);
return X86EMUL_OKAY;
}
__vmread(GUEST_INTERRUPTIBILITY_INFO, &intr_shadow);
if ( intr_shadow & VMX_INTR_SHADOW_MOV_SS )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.