Commit 826c1362 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Radim Krčmář
Browse files

x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed

Since commit 09abb5e3 ("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: fca91f6d

 ("kvm: nVMX: Set VM instruction error for VMPTRLD of unbacked page")
Reported-by: default avatarCornelia Huck <>
Signed-off-by: default avatarVitaly Kuznetsov <>
Reviewed-by: default avatarSean Christopherson <>
Reviewed-by: default avatarCornelia Huck <>
Signed-off-by: default avatarRadim Krčmář <>
parent cf1754c2
......@@ -4540,9 +4540,8 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
* given physical address won't match the required
* VMCS12_REVISION identifier.
return nested_vmx_failValid(vcpu,
return kvm_skip_emulated_instruction(vcpu);
new_vmcs12 = kmap(page);
if (new_vmcs12->hdr.revision_id != VMCS12_REVISION ||
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment