mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sascha Bischoff <sascha.bischoff@arm.com>
To: Marc Zyngier <maz@kernel.org>,
	 Lorenzo Pieralisi <lpieralisi@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>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,  Fuad Tabba <fuad.tabba@linux.dev>,
	 Sascha Bischoff <sascha.bischoff@arm.com>,
	 Sashiko AI <sashiko-bot@kernel.org>
Subject: [PATCH v3 00/14] irqchip/gic-v5: Fix misc IRS and ITS host driver issues
Date: Wed, 18 Nov 2026 17:35:29 +0000	[thread overview]
Message-ID: <20261118-host_gicv5_fixes-v3-0-13c1859e8aa3@arm.com> (raw)

This series fixes issues in the GICv5 host IRS and ITS drivers.

The ITS invalidation serialisation fix addresses Sashiko's report of a
race between event and device invalidation commands [1]. The other
patches fix IRS allocation and routing, IRS synchronisation, ITS table
selection and cache maintenance, ACPI coherency handling, and resource
cleanup.

Since v2, Fuad reported missing cache maintenance and L1 invalidation
when allocating an L2 device table, as well as unsafe table cleanup
after a hardware timeout [2]. This revision includes his L2
device-table cache-clean patch and adds fixes for L1 invalidation and
the host IRS and ITS timeout paths.

The IRS changes:
* Reject allocation of an SPI without a backing IRS and warn about
  broken firmware.
* Only program IRS_PE_CR0.DPS when 1-of-N routing is supported.
* Serialise synchronisation requests and their completion polls.
* Retain the L2 IST and its L1 entry if mapping times out, and prevent
  a later allocation from overwriting the pending mapping.

The ITS changes:
* Serialise event and device cache invalidations, which share the
  DIDR register.
* Select linear device and interrupt translation tables when one L2
  table covers the full ID space.
* Honour the ACPI noncoherent flag.
* Use firmware-node names in initialisation warnings.
* Invalidate the device cache before freeing an ITT.
* Correct cache-maintenance sizing after limiting the DeviceID width.
* Release the reserved MMIO region if DT-based ITS initialisation
  fails.
* Retain the ITT if device invalidation times out during registration
  or teardown.
* Clean a new L2 device table before publishing its valid L1 DTE.
* Invalidate the L1 DTE immediately after publishing the L2 device
  table, including when device registration subsequently fails.

The IRS/ITS locking fixes, ITS table-selection fix, ACPI coherency
fix, device-table cache-maintenance fixes and L1 DTE invalidation fix
carry Cc: stable trailers for backporting.

The series is based on v7.4-rc3. Thanks to Lorenzo for the review and
to Fuad for the additional reports and cache-clean patch.

Sascha

[1] https://sashiko.dev/#/patchset/20261016155741.979985-1-sascha.bischoff@arm.com?part=11
[2] https://lore.kernel.org/r/20261112145814.853424-1-fuad.tabba@linux.dev

Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
---
Changes in v3:
- Rebased onto v7.4-rc3.
- Added Fuad's patch to clean an L2 device table before publishing it.
- Retain the L2 IST and its L1 entry on a mapping timeout, and reject
  subsequent allocation attempts that would overwrite a pending mapping.
- Retain ITTs when device invalidation times out during registration
  or teardown.
- Added L1 DTE invalidation immediately after publishing an L2 device
  table, keeping single-device invalidations for registration and teardown.
- Reworded the IRS synchronisation and ITS invalidation commit messages
  to describe the host issues without relying on future KVM support.
- Collected Acked-by tags and reordered commit trailers as requested.
- Link to v2: https://patch.msgid.link/20261104-host_gicv5_fixes-v2-0-e47ad20ea3c8@arm.com

Changes in v2:
- Explained why IRS synchronisation uses a raw spinlock in the KVM
  affinity path.
- Clarified the ITS invalidation race and described the KVM forwarding
  path.
- Reworked to calculate the device-table size after capping the
  DeviceID width.
- Reordered local declarations in the ITS probe function to be in
  reverse fir tree order.
- Added Acked-by tags.
- Link to v1: https://patch.msgid.link/20261102-host_gicv5_fixes-v1-0-743b61626fc5@arm.com

Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
To: Lorenzo Pieralisi <lpieralisi@kernel.org>
To: Marc Zyngier <maz@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
To: Radu Rendec <radu@rendec.net>
To: Sascha Bischoff <sascha.bischoff@arm.com>
To: Timothy Hayes <timothy.hayes@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
To: Jonathan Cameron <jic23@kernel.org>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

---
Fuad Tabba (1):
      irqchip/gic-v5: Clean a level 2 device table before making it valid

Sascha Bischoff (13):
      irqchip/gic-v5: Reject SPIs not backed by an IRS
      irqchip/gic-v5: Only set IRS DPS when 1ofN routing is supported
      irqchip/gic-v5: Serialise IRS synchronisation requests
      irqchip/gic-v5: Retain the L2 IST when mapping times out
      irqchip/gic-v5: Serialise ITS invalidation commands
      irqchip/gic-v5: Use linear DT and ITT when L2 covers all IDs
      irqchip/gic-v5: Honour ACPI ITS noncoherent flag
      irqchip/gic-v5: Use firmware node name in ITS warning
      irqchip/gic-v5: Invalidate ITS device cache before freeing ITT
      irqchip/gic-v5: Clean the allocated linear device table size
      irqchip/gic-v5: Release ITS MMIO region on DT probe failure
      irqchip/gic-v5: Retain the ITT when device invalidation times out
      irqchip/gic-v5: Invalidate the L1 DTE when allocating an L2 device table

 drivers/irqchip/irq-gic-v5-irs.c   | 34 ++++++++++++-------
 drivers/irqchip/irq-gic-v5-its.c   | 68 +++++++++++++++++++++++++++++---------
 drivers/irqchip/irq-gic-v5.c       |  9 +++++
 include/linux/irqchip/arm-gic-v5.h |  1 +
 4 files changed, 84 insertions(+), 28 deletions(-)
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261102-host_gicv5_fixes-1eeea29d2ea4

Best regards,
--  
Sascha Bischoff <sascha.bischoff@arm.com>


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

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 17:35 Sascha Bischoff [this message]
2026-11-18 17:35 ` [PATCH v3 01/14] irqchip/gic-v5: Reject SPIs not backed by an IRS Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 02/14] irqchip/gic-v5: Only set IRS DPS when 1ofN routing is supported Sascha Bischoff
2026-11-19 11:50   ` Fuad Tabba
2026-11-18 17:35 ` [PATCH v3 03/14] irqchip/gic-v5: Serialise IRS synchronisation requests Sascha Bischoff
2026-11-19 11:53   ` Fuad Tabba
2026-11-18 17:35 ` [PATCH v3 04/14] irqchip/gic-v5: Retain the L2 IST when mapping times out Sascha Bischoff
2026-11-19 12:00   ` Fuad Tabba
2026-11-18 17:35 ` [PATCH v3 05/14] irqchip/gic-v5: Serialise ITS invalidation commands Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 06/14] irqchip/gic-v5: Use linear DT and ITT when L2 covers all IDs Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 07/14] irqchip/gic-v5: Honour ACPI ITS noncoherent flag Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 08/14] irqchip/gic-v5: Use firmware node name in ITS warning Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 09/14] irqchip/gic-v5: Invalidate ITS device cache before freeing ITT Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 10/14] irqchip/gic-v5: Clean the allocated linear device table size Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 11/14] irqchip/gic-v5: Release ITS MMIO region on DT probe failure Sascha Bischoff
2026-11-18 17:35 ` [PATCH v3 12/14] irqchip/gic-v5: Retain the ITT when device invalidation times out Sascha Bischoff
2026-11-19 10:28   ` Lorenzo Pieralisi
2026-11-19 12:07     ` Fuad Tabba
2026-11-18 17:35 ` [PATCH v3 13/14] irqchip/gic-v5: Clean a level 2 device table before making it valid Sascha Bischoff
2026-11-19 10:19   ` Lorenzo Pieralisi
2026-11-18 17:35 ` [PATCH v3 14/14] irqchip/gic-v5: Invalidate the L1 DTE when allocating an L2 device table Sascha Bischoff
2026-11-19 10:13   ` Lorenzo Pieralisi
2026-11-19 12:32     ` Fuad Tabba

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=20261118-host_gicv5_fixes-v3-0-13c1859e8aa3@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=sashiko-bot@kernel.org \
    --cc=tglx@kernel.org \
    --cc=timothy.hayes@arm.com \
    /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®