mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: SEV: Fixups for the cache maintenance fixes
@ 2026-09-28 15:46 Sean Christopherson
  2026-09-28 15:46 ` [PATCH 1/2] KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it Sean Christopherson
  2026-09-28 15:46 ` [PATCH 2/2] KVM: SEV: Do cache maintenance on the source VM *before* clearing SEV state Sean Christopherson
  0 siblings, 2 replies; 3+ messages in thread
From: Sean Christopherson @ 2026-09-28 15:46 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, Sashiko Bot

Two fixes, two bugs.  I'm batting a 1.000.  Fix a double-free and a race
pointed out by Sashiko.

Regarding fixing the double free, I initially said I'd just move the allocation
to avoid having to deal with CPUMASK_OFFSTACK=n[*], but that felt too much like
I was leaving trap for someone else.  So instead I elected to nullify the
pointer with memset(), which has a fairly desirable side effect of clearing the
mask when CPUMASK_OFFSTACK=n.

[*] https://lore.kernel.org/all/arQMARDUTSjbWpMX@google.com

Sean Christopherson (2):
  KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it
  KVM: SEV: Do cache maintenance on the source VM *before* clearing SEV
    state

 arch/x86/kvm/svm/sev.c | 46 ++++++++++++++++++++++++++----------------
 1 file changed, 29 insertions(+), 17 deletions(-)


base-commit: a4bab1c12fd528ccaafee00360e07463873404a9
-- 
2.56.0.rc1.315.gc6ed9934b7-goog


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

end of thread, other threads:[~2026-09-28 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 15:46 [PATCH 0/2] KVM: SEV: Fixups for the cache maintenance fixes Sean Christopherson
2026-09-28 15:46 ` [PATCH 1/2] KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it Sean Christopherson
2026-09-28 15:46 ` [PATCH 2/2] KVM: SEV: Do cache maintenance on the source VM *before* clearing SEV state 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®