KVM: nSVM: Minor post-war fixups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: nSVM: Simplify error handling of nested_svm_copy_vmcb12_to_cache()arch/ | +12 | 0 replies | |
| 2/2 | KVM: selftests: Actually check #GP on VMRUN with invalid vmcb12tools/ | +14 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] KVM: nSVM: Minor post-war fixups
A couple of fixups in the aftermath of all nSVM patches, the first one is just a cleanup suggested offlist by Sean, and the second is a fix for the test to make sure it's checking #GP on VMRUN not VMLOAD.
In all honestly, I am not sure *why* the test was passing and a #GP was generated on VMLOAD with a very large but valid GPA. vls=1, so KVM should not be intercepting VMLOAD (in which case it would inject the #GP). A #NPF is generated on the VMLOAD, and through tracing I found out that kvm_mmu_page_fault() returns 1 (RETRY) to npf_interception(). There shouldn't be a corresponding memslot, so I am not sure if KVM stuffed an invalid mapping in the NPTs, or if KVM did nothing and the CPU #GP due to an infinite #NPF loop (although npf_interception() was only called once). Anyway, figuring that out is irrelevant to the fixup, which makes sure we're actually getting #GP on VMRUN.
Yosry Ahmed (2):
KVM: nSVM: Simplify error handling of
nested_svm_copy_vmcb12_to_cache()
KVM: selftests: Actually check #GP on VMRUN with invalid vmcb12
arch/x86/kvm/svm/nested.c | 23 +++++++------- .../kvm/x86/svm_nested_invalid_vmcb12_gpa.c | 31 +++++++++---------- 2 files changed, 26 insertions(+), 28 deletions(-)
base-commit: 5128b972fb2801ad9aca54d990a75611ab5283a9
Signature · 1 line
2.53.0.473.g4a7958ca14-goog