Commit 179e33f
KVM: nSVM: Always inject a #GP if mapping VMCB12 fails on nested VMRUN
commit 01ddcdc55e097ca38c28ae656711b8e6d1df71f8 upstream.
nested_svm_vmrun() currently only injects a #GP if kvm_vcpu_map() fails
with -EINVAL. But it could also fail with -EFAULT if creating a host
mapping failed. Inject a #GP in all cases, no reason to treat failure
modes differently.
Fixes: 8c5fbf1 ("KVM/nSVM: Use the new mapping API for mapping guest memory")
CC: stable@vger.kernel.org
Co-developed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260303003421.2185681-6-yosry@kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ddc242a7bb449a935afdfa877f291e8d958170df)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent e908975 commit 179e33f
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | | - | |
867 | | - | |
| 866 | + | |
868 | 867 | | |
869 | 868 | | |
870 | | - | |
871 | | - | |
872 | 869 | | |
873 | 870 | | |
874 | 871 | | |
| |||
0 commit comments