mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: nSVM: Minor post-war fixups
@ 2026-03-05 20:30 Yosry Ahmed
  2026-03-05 20:30 ` [PATCH 1/2] KVM: nSVM: Simplify error handling of nested_svm_copy_vmcb12_to_cache() Yosry Ahmed
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yosry Ahmed @ 2026-03-05 20:30 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: Paolo Bonzini, kvm, linux-kernel, Yosry Ahmed

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
-- 
2.53.0.473.g4a7958ca14-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-06 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-05 20:30 [PATCH 0/2] KVM: nSVM: Minor post-war fixups Yosry Ahmed
2026-03-05 20:30 ` [PATCH 1/2] KVM: nSVM: Simplify error handling of nested_svm_copy_vmcb12_to_cache() Yosry Ahmed
2026-03-05 20:30 ` [PATCH 2/2] KVM: selftests: Actually check #GP on VMRUN with invalid vmcb12 Yosry Ahmed
2026-03-06 15:57 ` [PATCH 0/2] KVM: nSVM: Minor post-war fixups Yosry Ahmed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®