mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/8] KVM: SVM: A fix and cleanups for VMCB intercepts
@ 2026-02-18 23:09 Sean Christopherson
  2026-02-18 23:09 ` [PATCH v2 1/8] KVM: SVM: Explicitly mark vmcb01 dirty after modifying " Sean Christopherson
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Sean Christopherson @ 2026-02-18 23:09 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, Yosry Ahmed

Fix a likely-benign bug where KVM fails to mark vmcb01 intercepts as dirty
after recalculating intercepts while L2 is active, then do a bunch of related
cleanup, e.g. to split recalc_intercepts() into nested vs. non-nested
functionality.

v2:
 - Fix the aforementioned bug.
 - Split recalc_intercepts() instead of simply renaming it.
 - Move the new WARN in nested_vmcb02_recalc_intercepts() to its own patch.
 - Use less weird local variables even if they aren't consistent with the
   existing code...
 - ... and then change some names in the existing code to provide consistency.

v1: https://lkml.kernel.org/r/20260112182022.771276-1-yosry.ahmed%40linux.dev

Sean Christopherson (6):
  KVM: SVM: Explicitly mark vmcb01 dirty after modifying VMCB intercepts
  KVM: SVM: Separate recalc_intercepts() into nested vs. non-nested
    parts
  KVM: nSVM: Directly (re)calc vmcb02 intercepts from
    nested_vmcb02_prepare_control()
  KVM: nSVM: Use intuitive local variables in
    nested_vmcb02_recalc_intercepts()
  KVM: nSVM: Move vmcb_ctrl_area_cached.bus_lock_rip to svm_nested_state
  KVM: nSVM: Capture svm->nested.ctl as vmcb12_ctrl when preparing
    vmcb02

Yosry Ahmed (2):
  KVM: nSVM: WARN and abort vmcb02 intercepts recalc if vmcb02 isn't
    active
  KVM: nSVM: Use vmcb12_is_intercept() in
    nested_sync_control_from_vmcb02()

 arch/x86/kvm/svm/nested.c | 88 +++++++++++++++++++--------------------
 arch/x86/kvm/svm/sev.c    |  2 +-
 arch/x86/kvm/svm/svm.c    |  6 +--
 arch/x86/kvm/svm/svm.h    | 28 +++++++++----
 4 files changed, 67 insertions(+), 57 deletions(-)


base-commit: 183bb0ce8c77b0fd1fb25874112bc8751a461e49
-- 
2.53.0.345.g96ddfc5eaa-goog


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

end of thread, other threads:[~2026-03-05 17:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-18 23:09 [PATCH v2 0/8] KVM: SVM: A fix and cleanups for VMCB intercepts Sean Christopherson
2026-02-18 23:09 ` [PATCH v2 1/8] KVM: SVM: Explicitly mark vmcb01 dirty after modifying " Sean Christopherson
2026-02-18 23:15   ` Yosry Ahmed
2026-02-18 23:09 ` [PATCH v2 2/8] KVM: SVM: Separate recalc_intercepts() into nested vs. non-nested parts Sean Christopherson
2026-02-18 23:19   ` Yosry Ahmed
2026-02-18 23:09 ` [PATCH v2 3/8] KVM: nSVM: WARN and abort vmcb02 intercepts recalc if vmcb02 isn't active Sean Christopherson
2026-02-18 23:09 ` [PATCH v2 4/8] KVM: nSVM: Directly (re)calc vmcb02 intercepts from nested_vmcb02_prepare_control() Sean Christopherson
2026-02-18 23:20   ` Yosry Ahmed
2026-02-18 23:09 ` [PATCH v2 5/8] KVM: nSVM: Use intuitive local variables in nested_vmcb02_recalc_intercepts() Sean Christopherson
2026-02-18 23:09 ` [PATCH v2 6/8] KVM: nSVM: Use vmcb12_is_intercept() in nested_sync_control_from_vmcb02() Sean Christopherson
2026-02-18 23:09 ` [PATCH v2 7/8] KVM: nSVM: Move vmcb_ctrl_area_cached.bus_lock_rip to svm_nested_state Sean Christopherson
2026-02-18 23:21   ` Yosry Ahmed
2026-02-18 23:09 ` [PATCH v2 8/8] KVM: nSVM: Capture svm->nested.ctl as vmcb12_ctrl when preparing vmcb02 Sean Christopherson
2026-02-18 23:23   ` Yosry Ahmed
2026-03-05 17:08 ` [PATCH v2 0/8] KVM: SVM: A fix and cleanups for VMCB intercepts Sean Christopherson

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®