Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lpieralisi@kernel.org>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Sascha Bischoff <sascha.bischoff@arm.com>,
	Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@kernel.org>,
	Radu Rendec <radu@rendec.net>,
	Timothy Hayes <timothy.hayes@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Jonathan Cameron <jic23@kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>
Subject: Re: [PATCH v2 00/10] irqchip/gic-v5: Fix misc IRS and ITS host driver issues
Date: Mon, 16 Nov 2026 15:06:08 +0100	[thread overview]
Message-ID: <avsN0E-6_7kU3pTk@red-moon> (raw)
In-Reply-To: <CA+EHjTyGQbS7zcHSRg50c5xVN2AY4AmMc7JqNAvrc=_UhPQ+kg@mail.gmail.com>

On Mon, Nov 16, 2026 at 01:28:56PM +0000, Fuad Tabba wrote:
> Hi Lorenzo,
> 
> On Mon, 16 Nov 2026 12:14:50 +0000, Lorenzo Pieralisi
> <lpieralisi@kernel.org> wrote:
> [...]
> > > invalidate have the same shape. The question is, can an IRS miss the
> > > poll, or is a timeout here only ever a dead IRS?
> >
> > Thank you for your patches Fuad.
> >
> > The latter, though freeing memory on timeout wasn't a good idea given
> > that there is no way to cancel the respective, pending, mapping.
> 
> Thanks, that answers it. If you'd like a patch that doesn't free the
> memory on a timeout, let me know and I'll send one.

Thanks. Again, if that timeout expires I think we have more serious
problems than the IST mapping but I do agree that freeing memory
is not the answer; not urgent - please send a patch given that
you spotted it, can obviously do it too.

> 
> [...]
> > > Notes:
> > >     Setting L1 on every invalidation turns each registration and
> > >     teardown into a range invalidate, both rare paths, and keeps the
> > >     function simple. Setting it only when registration allocates the
> > >     level 2 table would miss a registration that fails after the
> > >     allocation, which leaves the level 1 DTE valid.
> >
> > I can't follow. I agree that we have to invalidate the L1 DTE on
> > L2 allocation but that's a one-off, I don't understand what issues
> > you are pointing out in the Notes above, if you can point out please
> > the code paths it refers to that'd help.
> 
> gicv5_its_device_register() can fail after
> gicv5_its_devtab_get_dte_ref() has made the L1 DTE valid, and before
> the gicv5_its_device_cache_inv() at the end. That happens if the
> EventID bits check fails, or the ITT allocation does. The L1 DTE is
> then already valid for the next device registered under it, so that
> registration doesn't allocate a level 2 table.
> 
> The patch Notes were about setting ITS_INV_DEVICER.L1 in that
> gicv5_its_device_cache_inv() call only when the registration allocated
> the table. In that case the failed registration never reaches that
> call and the next one reaches it with L1 clear, so this L1 DTE is
> never invalidated. Invalidating in gicv5_its_alloc_l2_devtab(), right
> after the L1 DTE write, is the one-off you describe. I'll rework the
> patch to do that instead.

Yes, I think that's what we should do - invalidating in
gicv5_its_alloc_l2_devtab() once for all and leave everything else as-is
matches architecture guidelines.

Thanks again.

Lorenzo


      reply	other threads:[~2026-11-16 14:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 17:47 [PATCH v2 00/10] irqchip/gic-v5: Fix misc IRS and ITS host driver issues Sascha Bischoff
2026-11-04 17:47 ` [PATCH v2 01/10] irqchip/gic-v5: Reject SPIs not backed by an IRS Sascha Bischoff
2026-11-05  7:35   ` Lorenzo Pieralisi
2026-11-04 17:47 ` [PATCH v2 02/10] irqchip/gic-v5: Only set IRS DPS when 1ofN routing is supported Sascha Bischoff
2026-11-04 17:47 ` [PATCH v2 03/10] irqchip/gic-v5: Serialise IRS synchronisation requests Sascha Bischoff
2026-11-05  7:48   ` Lorenzo Pieralisi
2026-11-04 17:47 ` [PATCH v2 04/10] irqchip/gic-v5: Serialise ITS invalidation commands Sascha Bischoff
2026-11-05  8:31   ` Lorenzo Pieralisi
2026-11-04 17:47 ` [PATCH v2 05/10] irqchip/gic-v5: Use linear DT and ITT when L2 covers all IDs Sascha Bischoff
2026-11-04 17:48 ` [PATCH v2 06/10] irqchip/gic-v5: Honour ACPI ITS noncoherent flag Sascha Bischoff
2026-11-04 17:48 ` [PATCH v2 07/10] irqchip/gic-v5: Use firmware node name in ITS warning Sascha Bischoff
2026-11-04 17:48 ` [PATCH v2 08/10] irqchip/gic-v5: Invalidate ITS device cache before freeing ITT Sascha Bischoff
2026-11-04 17:48 ` [PATCH v2 09/10] irqchip/gic-v5: Clean the allocated linear device table size Sascha Bischoff
2026-11-05  7:37   ` Lorenzo Pieralisi
2026-11-04 17:48 ` [PATCH v2 10/10] irqchip/gic-v5: Release ITS MMIO region on DT probe failure Sascha Bischoff
2026-11-12 14:58 ` [PATCH v2 00/10] irqchip/gic-v5: Fix misc IRS and ITS host driver issues Fuad Tabba
2026-11-16 12:14   ` Lorenzo Pieralisi
2026-11-16 13:28     ` Fuad Tabba
2026-11-16 14:06       ` Lorenzo Pieralisi [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=avsN0E-6_7kU3pTk@red-moon \
    --to=lpieralisi@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=fuad.tabba@linux.dev \
    --cc=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=radu@rendec.net \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sascha.bischoff@arm.com \
    --cc=tglx@kernel.org \
    --cc=timothy.hayes@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox