]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Fix nested VM-Exit on #GP interception handling
authorSean Christopherson <seanjc@google.com>
Wed, 24 Feb 2021 00:56:26 +0000 (16:56 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 25 Feb 2021 10:13:05 +0000 (05:13 -0500)
commitb9482e038e1d771afa41b99449cd3c339f02ea10
tree9fac68fd57e5e26c43cefe5857121c1de4da9b22
parentd0f7912c76d0304df2605a75761884b2d7384803
KVM: SVM: Fix nested VM-Exit on #GP interception handling

Fix the interpreation of nested_svm_vmexit()'s return value when
synthesizing a nested VM-Exit after intercepting an SVM instruction while
L2 was running.  The helper returns '0' on success, whereas a return
value of '0' in the exit handler path means "exit to userspace".  The
incorrect return value causes KVM to exit to userspace without filling
the run state, e.g. QEMU logs "KVM: unknown exit, hardware reason 0".

Fixes: 152a94f642e3 ("KVM: SVM: Fix #GP handling for doubly-nested virtualization")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210224005627.657028-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c