All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: Vasant Hegde <vasant.hegde@amd.com>,
	Joerg Roedel <joro@8bytes.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 答复: [外部邮件] Re: [PATCH] iommu/amd: RCU-protect iommu_ga_log_notifier
Date: Tue, 17 Nov 2026 02:18:43 +0000	[thread overview]
Message-ID: <ea2a95095eba47a99df64adde16fd71a@baidu.com> (raw)
In-Reply-To: <301430f5-c96a-42e2-bd81-de564650f9a9@amd.com>

> >  	 * Ensure all in-flight IRQ handlers run to completion before
> > returning @@ -1094,17 +1094,25 @@ static void iommu_poll_ga_log(struct
> > amd_iommu *iommu)
> >
> >  		/* Handle GA entry */
> >  		switch (GA_REQ_TYPE(log_entry)) {
> > -		case GA_GUEST_NR:
> > -			if (!iommu_ga_log_notifier)
> > -				break;
> > -
> > -			pr_debug("%s: devid=%#x, ga_tag=%#x\n",
> > -				 __func__, GA_DEVID(log_entry),
> > -				 GA_TAG(log_entry));
> > +		case GA_GUEST_NR: {
> > +			int (*notifier)(u32 ga_tag);
> > +			int ret = 0;
> > +
> > +			scoped_guard(rcu) {
> 
> Why we need scoped_guard()? we don't have multiple error condition to handle.
> I think  simple rcu_read_lock() -> call notifier stuff -> rcu_read_unlock() is good
> enough. That way we can avoid multiple if(notifier) check as well.
> 
>

Reasonable, I will send v2, thanks

[Li,Rongqing] 



      reply	other threads:[~2026-11-17  2:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  6:47 [PATCH] iommu/amd: RCU-protect iommu_ga_log_notifier lirongqing
2026-10-14  6:14 ` 答复: " Li,Rongqing
2026-11-16 14:48 ` Vasant Hegde
2026-11-17  2:18   ` Li,Rongqing [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=ea2a95095eba47a99df64adde16fd71a@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=vasant.hegde@amd.com \
    --cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.