From: Sean Christopherson <seanjc@google.com>
To: Sairaj Kodilkar <sarunkod@amd.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@kernel.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
x86@kernel.org, vasant.hegde@amd.com,
suravee.suthikulpanit@amd.com
Subject: Re: [PATCH v2] x86/kvm: Use RCU for svm_vm_data_hash
Date: Wed, 11 Nov 2026 07:04:00 -0800 [thread overview]
Message-ID: <avSD4O4AELPcmhqb@seanjc-mac.roam.internal> (raw)
In-Reply-To: <20261111122128.12998-1-sarunkod@amd.com>
KVM: SVM:
"x86/kvm:" is specifically for guest-side code, e.g. arch/x86/kernel/kvm.c
> Changes since v1:
In the future, please wait the "normal" amount of time before sending a new
version, e.g. a day or two for something relatively simple like this. I.e.
treat feedback from Sashiko like feedback from a human reviewer, and don't spam
patches.
There are times when it's acceptable to break the "don't spam patches" rule, but
this isn't one of those times.
> int avic_vcpu_precreate(struct kvm *kvm)
> @@ -373,9 +373,12 @@ void avic_vm_pre_destroy(struct kvm *kvm)
> if (WARN_ON_ONCE(!enable_apicv) || !kvm_svm->avic_vm_id)
> return;
>
> - guard(spinlock_irqsave)(&svm_vm_data_hash_lock);
> + {
> + guard(spinlock_irqsave)(&svm_vm_data_hash_lock);
> + hash_del_rcu(&kvm_svm->hnode);
Eww. Don't open code scoped_guard(), e.g. this should work:
scoped_guard(spinlock_irqsave, &svm_vm_data_hash_lock)
hash_del(&kvm_svm->hnode);
synchronize_rcu();
I'm a little hesitant to put a full synchronize_rcu() in the destroy path, but
in practice it's should be ok.
next prev parent reply other threads:[~2026-11-11 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 12:21 Sairaj Kodilkar
2026-11-11 15:04 ` Sean Christopherson [this message]
2026-11-11 15:12 ` Sairaj Kodilkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avSD4O4AELPcmhqb@seanjc-mac.roam.internal \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=sarunkod@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tglx@kernel.org \
--cc=vasant.hegde@amd.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®