Skip to content

Commit a061985

Browse files
Dan Carpenterbonzini
authored andcommitted
x86: KVM: svm: Fix a check in nested_svm_vmrun()
We refactored this code a bit and accidentally deleted the "-" character from "-EINVAL". The kvm_vcpu_map() function never returns positive EINVAL. Fixes: c8e16b7 ("x86: KVM: svm: eliminate hardcoded RIP advancement from vmrun_interception()") Cc: [email protected] Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Reviewed-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 7396d33 commit a061985

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/svm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3598,7 +3598,7 @@ static int nested_svm_vmrun(struct vcpu_svm *svm)
35983598
vmcb_gpa = svm->vmcb->save.rax;
35993599

36003600
ret = kvm_vcpu_map(&svm->vcpu, gpa_to_gfn(vmcb_gpa), &map);
3601-
if (ret == EINVAL) {
3601+
if (ret == -EINVAL) {
36023602
kvm_inject_gp(&svm->vcpu, 0);
36033603
return 1;
36043604
} else if (ret) {

0 commit comments

Comments
 (0)