mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sascha Bischoff <sascha.bischoff@arm.com>
To: Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Fuad Tabba <fuad.tabba@linux.dev>
Cc: 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: Wed, 18 Nov 2026 14:58:59 +0000	[thread overview]
Message-ID: <ea064380-ad7b-4f79-ac17-1174555ed10a@arm.com> (raw)
In-Reply-To: <avsN0E-6_7kU3pTk@red-moon>

Hi Fuad,

On 16/11/2026 14:06, Lorenzo Pieralisi wrote:
> 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.

Seconded. Thanks a lot.

I'm more than happy to include "irqchip/gic-v5: Clean a level 2 device 
table before making it valid" in v3!

>>>
>>> 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.

I've got some patches addressing the ITT and IST mapping issues in the 
host driver, which I can include in v3 if you haven't already started 
working on these. I'll make sure to include the appropriate Reported-by 
tags, of course!

I'll post a fix for the VMT separately as it doesn't belong in this series.

> 
>>
>> [...]
>>>> 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.

Agreed. I've got a reworked fix for this too, which I can include in v3.

> 
> Thanks again.
> 
> Lorenzo

Thanks,
Sascha

  reply	other threads:[~2026-11-18 14:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 17:47 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-18 15:32     ` Sascha Bischoff
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-18 15:34     ` Sascha Bischoff
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
2026-11-18 14:58         ` Sascha Bischoff [this message]
2026-11-18 15:16           ` Fuad Tabba
2026-11-18 15:20             ` Sascha Bischoff

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=ea064380-ad7b-4f79-ac17-1174555ed10a@arm.com \
    --to=sascha.bischoff@arm.com \
    --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=lpieralisi@kernel.org \
    --cc=maz@kernel.org \
    --cc=radu@rendec.net \
    --cc=rafael.j.wysocki@intel.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

all inboxes | Powered by JetHome®