Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-pci@vger.kernel.org
Subject: [PATCH AUTOSEL 6.19-5.10] PCI: Add ACS quirk for Qualcomm Hamoa & Glymur
Date: Sat, 14 Feb 2026 16:23:20 -0500	[thread overview]
Message-ID: <20260214212452.782265-55-sashal@kernel.org> (raw)
In-Reply-To: <20260214212452.782265-1-sashal@kernel.org>

From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>

[ Upstream commit 44d2f70b1fd72c339c72983fcffa181beae3e113 ]

The Qualcomm Hamoa & Glymur Root Ports don't advertise an ACS capability,
but they do provide ACS-like features to disable peer transactions and
validate bus numbers in requests.

Add an ACS quirk for Hamoa & Glymur.

Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260109-acs_quirk-v1-1-82adf95a89ae@oss.qualcomm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Analysis

### Commit Message Analysis

This commit adds ACS (Access Control Services) quirk entries for two
Qualcomm root port devices: Hamoa (device ID 0x0111) and Glymur (device
ID 0x0120). The commit message explains that these root ports don't
advertise ACS capability but do provide ACS-like features to disable
peer transactions and validate bus numbers.

### Code Change Analysis

The change is extremely simple and contained:
- **4 lines added** (2 comment lines + 2 data entries) in
  `drivers/pci/quirks.c`
- Adds two new entries to the `pci_dev_acs_enabled` table
- Both entries use `PCI_VENDOR_ID_QCOM` with the existing
  `pci_quirk_qcom_rp_acs` handler
- The pattern is identical to the existing QCOM SA8775P, QDF2xxx, and
  HXT entries already in the table

### Classification: Hardware Quirk / Device ID Addition

This falls squarely into the **"QUIRKS and WORKAROUNDS"** exception
category for stable backports:

1. **It's a PCI quirk** for hardware with broken/missing ACS
   advertisement
2. **The infrastructure already exists** - `pci_quirk_qcom_rp_acs` is
   already in the kernel and used by other Qualcomm devices
3. **Only data table entries are added** - no new code logic whatsoever
4. **It enables correct IOMMU isolation** on these platforms

### Why This Matters

ACS quirks are important for:
- **VFIO/PCIe passthrough**: Without the ACS quirk, IOMMU groups may be
  incorrectly merged, preventing device assignment to VMs
- **Security isolation**: ACS ensures peer-to-peer transactions between
  devices go through the IOMMU, which is critical for DMA security
- **Functionality**: Users with Qualcomm Hamoa or Glymur platforms
  cannot properly use PCIe device passthrough without this quirk

### Risk Assessment

- **Risk: Extremely low** - This only adds entries to a static data
  table. The quirk function `pci_quirk_qcom_rp_acs` is already proven
  and used by other QCOM devices. The new entries will only match on the
  specific vendor:device combinations, so no other hardware is affected.
- **Benefit: Real** - Users with these Qualcomm platforms get correct
  IOMMU group isolation
- **Dependencies: None** - The `pci_quirk_qcom_rp_acs` function and
  `PCI_VENDOR_ID_QCOM` already exist in stable trees
- **Backport complexity: Trivial** - The patch should apply cleanly to
  any stable tree that has the QCOM SA8775P entry (or can be trivially
  adjusted)

### Scope and Stability

- 4 lines of change in a single file
- Pure data addition to an existing table
- No logic changes, no new functions, no new APIs
- Zero risk of regression for any other hardware
- Well-tested pattern (dozens of similar quirk entries exist)

This is a textbook example of a hardware quirk addition that is
appropriate for stable trees. It's small, obviously correct, uses
existing infrastructure, and enables real hardware to work properly.

**YES**

 drivers/pci/quirks.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 9100fd133a7ff..54c76ba9a767e 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5117,6 +5117,10 @@ static const struct pci_dev_acs_enabled {
 	{ PCI_VENDOR_ID_QCOM, 0x0401, pci_quirk_qcom_rp_acs },
 	/* QCOM SA8775P root port */
 	{ PCI_VENDOR_ID_QCOM, 0x0115, pci_quirk_qcom_rp_acs },
+	/* QCOM Hamoa root port */
+	{ PCI_VENDOR_ID_QCOM, 0x0111, pci_quirk_qcom_rp_acs },
+	/* QCOM Glymur root port */
+	{ PCI_VENDOR_ID_QCOM, 0x0120, pci_quirk_qcom_rp_acs },
 	/* HXT SD4800 root ports. The ACS design is same as QCOM QDF2xxx */
 	{ PCI_VENDOR_ID_HXT, 0x0401, pci_quirk_qcom_rp_acs },
 	/* Intel PCH root ports */
-- 
2.51.0


  parent reply	other threads:[~2026-02-14 21:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260214212452.782265-1-sashal@kernel.org>
2026-02-14 21:22 ` [PATCH AUTOSEL 6.19-6.18] PCI/bwctrl: Disable BW controller on Intel P45 using a quirk Sasha Levin
2026-02-14 21:22 ` [PATCH AUTOSEL 6.19-6.18] PCI: dwc: Skip PME_Turn_Off broadcast and L2/L3 transition during suspend if link is not up Sasha Levin
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19-5.10] PCI: Mark Nvidia GB10 to avoid bus reset Sasha Levin
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19-6.18] PCI: dwc: ep: Cache MSI outbound iATU mapping Sasha Levin
2026-02-16  1:15   ` Koichiro Den
2026-02-14 21:23 ` Sasha Levin [this message]
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19] PCI: cadence: Avoid signed 64-bit truncation and invalid sort Sasha Levin
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19-5.10] PCI: Enable ACS after configuring IOMMU for OF platforms Sasha Levin
2026-03-18  8:21   ` Thorsten Leemhuis
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19-5.10] PCI: Mark ASM1164 SATA controller to avoid bus reset Sasha Levin
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19-6.18] PCI: imx6: Add CLKREQ# override to enable REFCLK for i.MX95 PCIe Sasha Levin
2026-02-14 21:23 ` [PATCH AUTOSEL 6.19-5.10] PCI: Fix pci_slot_lock () device locking Sasha Levin

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=20260214212452.782265-55-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.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