1
0
Fork 0

KVM: nVMX: Fail VMLAUNCH and VMRESUME on shadow VMCS

Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hifive-unleashed-5.1
Liran Alon 2018-06-23 02:35:04 +03:00 committed by Paolo Bonzini
parent fa97d7dba7
commit a6192d40d5
1 changed files with 11 additions and 0 deletions

View File

@ -11876,6 +11876,17 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
vmcs12 = get_vmcs12(vcpu);
/*
* Can't VMLAUNCH or VMRESUME a shadow VMCS. Despite the fact
* that there *is* a valid VMCS pointer, RFLAGS.CF is set
* rather than RFLAGS.ZF, and no error number is stored to the
* VM-instruction error field.
*/
if (vmcs12->hdr.shadow_vmcs) {
nested_vmx_failInvalid(vcpu);
goto out;
}
if (enable_shadow_vmcs)
copy_shadow_to_vmcs12(vmx);