* [PATCH] PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608]
@ 2026-07-20 21:57 Tim Harvey
2026-07-20 22:32 ` sashiko-bot
2026-07-21 16:28 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Tim Harvey @ 2026-07-20 21:57 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Tim Harvey, stable
The Pericom PI7C9X2G608 6-port Gen2 PCIe switch is also affected by
the PI7C9X2G errata per the errata document:
E2: ACS P2P Request Redirect Is Not Functional
Apply the same quirk to this PCI ID as well to apply the workaround
required if using ACS.
Fixes: acd61ffb2f16 ("PCI: Add ACS quirk for Pericom PI7C9X2G switches")
Cc: stable@vger.kernel.org
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
drivers/pci/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index b09f27f7846f..27f7d56c9ac3 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -6263,6 +6263,10 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_PERICOM, 0xb404,
pci_fixup_pericom_acs_store_forward);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_PERICOM, 0xb404,
pci_fixup_pericom_acs_store_forward);
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_PERICOM, 0x2608,
+ pci_fixup_pericom_acs_store_forward);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_PERICOM, 0x2608,
+ pci_fixup_pericom_acs_store_forward);
static void nvidia_ion_ahci_fixup(struct pci_dev *pdev)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608]
2026-07-20 21:57 [PATCH] PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608] Tim Harvey
@ 2026-07-20 22:32 ` sashiko-bot
2026-07-21 16:28 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-20 22:32 UTC (permalink / raw)
To: Tim Harvey; +Cc: linux-pci
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Unchecked cross-device configuration space write to upstream bridge
--
--- Patch [1]: [PATCH] PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608] ---
commit 675033e8622336b73d3cde73c4a110a428c76dc5
Author: Tim Harvey <tharvey@gateworks.com>
PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608]
This commit adds a PCI ACS quirk for the Pericom PI7C9X2G608 switch to
address erratum E2. It applies the existing store-forward workaround to
device ID 0x2608.
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index b09f27f7846fc..27f7d56c9ac39 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -6263,6 +6263,10 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_PERICOM, 0xb404,
> pci_fixup_pericom_acs_store_forward);
> DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_PERICOM, 0xb404,
> pci_fixup_pericom_acs_store_forward);
> +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_PERICOM, 0x2608,
> + pci_fixup_pericom_acs_store_forward);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_PERICOM, 0x2608,
> + pci_fixup_pericom_acs_store_forward);
[Severity: High]
This is a pre-existing issue, but does pci_fixup_pericom_acs_store_forward()
safely verify its upstream bridge?
Looking at the callback:
drivers/pci/quirks.c:pci_fixup_pericom_acs_store_forward() {
...
upstream = pci_upstream_bridge(pdev);
if (!upstream)
return;
pci_read_config_word(upstream, PI7C9X2Gxxx_MODE_REG, &val);
if (!(val & PI7C9X2Gxxx_STORE_FORWARD_MODE)) {
pci_write_config_word(upstream, PI7C9X2Gxxx_MODE_REG, val |
PI7C9X2Gxxx_STORE_FORWARD_MODE);
}
}
Because it finds the upstream bridge and unconditionally writes to offset
0x74 (PI7C9X2Gxxx_MODE_REG) without checking if the upstream bridge is
actually a Pericom device, could this corrupt standard PCI capabilities
such as MSI-X tables?
If a Pericom switch is passed through to a guest via VFIO, the upstream
bridge in the guest's virtual topology might be a generic virtual Root Port
rather than a Pericom device, exposing the guest kernel to configuration
space corruption.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260720215718.2139510-1-tharvey@gateworks.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608]
2026-07-20 21:57 [PATCH] PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608] Tim Harvey
2026-07-20 22:32 ` sashiko-bot
@ 2026-07-21 16:28 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2026-07-21 16:28 UTC (permalink / raw)
To: Tim Harvey, Nathan Rossi, Nathan Rossi
Cc: Bjorn Helgaas, linux-pci, linux-kernel, stable
[+to Nathan]
On Mon, Jul 20, 2026 at 02:57:18PM -0700, Tim Harvey wrote:
> The Pericom PI7C9X2G608 6-port Gen2 PCIe switch is also affected by
> the PI7C9X2G errata per the errata document:
> E2: ACS P2P Request Redirect Is Not Functional
>
> Apply the same quirk to this PCI ID as well to apply the workaround
> required if using ACS.
>
> Fixes: acd61ffb2f16 ("PCI: Add ACS quirk for Pericom PI7C9X2G switches")
> Cc: stable@vger.kernel.org
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to pci/virtualization for v7.3, thanks!
Note that Sashiko found what looks like a legit pre-existing issue
with acd61ffb2f16 ("PCI: Add ACS quirk for Pericom PI7C9X2G
switches"):
https://lore.kernel.org/all/20260720223203.A30841F000E9@smtp.kernel.org
> ---
> drivers/pci/quirks.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index b09f27f7846f..27f7d56c9ac3 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -6263,6 +6263,10 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_PERICOM, 0xb404,
> pci_fixup_pericom_acs_store_forward);
> DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_PERICOM, 0xb404,
> pci_fixup_pericom_acs_store_forward);
> +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_PERICOM, 0x2608,
> + pci_fixup_pericom_acs_store_forward);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_PERICOM, 0x2608,
> + pci_fixup_pericom_acs_store_forward);
>
> static void nvidia_ion_ahci_fixup(struct pci_dev *pdev)
> {
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-21 16:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 21:57 [PATCH] PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608] Tim Harvey
2026-07-20 22:32 ` sashiko-bot
2026-07-21 16:28 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox