From: Sairaj Kodilkar <sarunkod@amd.com>
To: Sean Christopherson <seanjc@google.com>
Cc: <sarunkod@amd.com>, "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 20:42:12 +0530 [thread overview]
Message-ID: <771dd3be-0c64-4d40-8dd0-de63b3867f70@amd.com> (raw)
In-Reply-To: <avSD4O4AELPcmhqb@seanjc-mac.roam.internal>
On 11/11/2026 8:34 PM, Sean Christopherson wrote:
> 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.
Hi Sean
Sorry about this, did not mean to spam the patches. I accidently sent
wrong version upstream, thats why decided to respin it. I'll be careful
from next time onwards.
>
>> 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:
Ahh right, I missed that.
>
> 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.
Thanks
Sairaj
prev parent reply other threads:[~2026-11-11 15:12 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
2026-11-11 15:12 ` Sairaj Kodilkar [this message]
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=771dd3be-0c64-4d40-8dd0-de63b3867f70@amd.com \
--to=sarunkod@amd.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=seanjc@google.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®