mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed
Since commit09abb5e3e5
("KVM: nVMX: call kvm_skip_emulated_instruction in nested_vmx_{fail,succeed}") nested_vmx_failValid() results in kvm_skip_emulated_instruction() so doing it again in handle_vmptrld() when vmptr address is not backed is wrong, we end up advancing RIP twice. Fixes:fca91f6d60
("kvm: nVMX: Set VM instruction error for VMPTRLD of unbacked page") Reported-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
cf1754c2a1
commit
826c1362e7
@ -4540,9 +4540,8 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
|
||||
* given physical address won't match the required
|
||||
* VMCS12_REVISION identifier.
|
||||
*/
|
||||
nested_vmx_failValid(vcpu,
|
||||
return nested_vmx_failValid(vcpu,
|
||||
VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID);
|
||||
return kvm_skip_emulated_instruction(vcpu);
|
||||
}
|
||||
new_vmcs12 = kmap(page);
|
||||
if (new_vmcs12->hdr.revision_id != VMCS12_REVISION ||
|
||||
|
Loading…
Reference in New Issue
Block a user