From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796251859; b=IwbAMWYBbvatO751Si/uRJ4oXUk3MaDddgLdgWAIXWqbtHvA4rbkEM0v6TMZzrrUH2RW SKMXix5NW0sDCKiluM9CLZny2e/KWStlEcx2bHcyeSZpjxyfAUADW/PFvOS3gMHQMx2gG B4hZSyTFyt/323QIr1DfsIouEdciWq9eB4Nbj7C+lYYjYN9/SvzwcaaV3jw01IcP+RrhZ sJjUltF1LNBOHkA6C3k2ql4j1VXDj2snGBeB0zb8WFyJlaU8ISuMD47OafDEUtzEGhRSj lLUPs9ZF8vltRZAlHf9MJl9Qa9SUNwW+bPVSJFX6vEhjEoivPo5BFXMKs8nJ759dzVA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796251859; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=E28wtJcSiWvo1eyxj6BT0OgcCokqxSXR0RjlWRt6V1s=; b=Uje48NAbhp4StOEURTd9whr7wdMdBByAQJ/iY4fKTmDZqxgPgNY8b60/A6UgwA62d/Bs G7/DTBTxlxHh5UzTpEQv6hcRCVMLvkR6ebPbdOX0FWQRGkvRnk7UphY0OgbLZ1Qqh273X 5CzNqNT7pmjEJpUXOqkpFfGedaHMHvf/cFcZT7pBQ10wsoORfv0uzNJppVmMBA4T1V1OH WoTcw45S1l7RRsMumkLh9dONKm9CDgv7f1ucdi5yOtqg/70RGQ8wATKmxaTAIzZsrc33A BVX4YcJYIDqfefDFiRoPbKquHbn6l3OfQSkgJ4RrSlgrGlDXqF/sgHXKiKXZkmy1wnw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=eIkhYqWJ; arc=none smtp.remote-ip=209.85.128.50 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B9DA606A330 for ; Wed, 2 Dec 2026 22:50:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7B9DA606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=eIkhYqWJ Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4a9a8d6cea8so4165315e9.1 for ; Wed, 02 Dec 2026 14:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796251857; x=1796856657; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=E28wtJcSiWvo1eyxj6BT0OgcCokqxSXR0RjlWRt6V1s=; b=eIkhYqWJc/e1is3KFOFXjg11S3ADBkOKoJ90aqpesXLvtyI6ZgpZaD42daC+Mo4CGi r/UQHuFNJo0Tn/BHXypu9cZnG4mcfA0eu4WbU7lA66dqeCB0FImhG26oFnEsJMfwPOcc 1U66OmYpkR/RDFUBOTIi3+vtUklYx+eOAA4SZNfoT2n6uXoxrTj92SPwwnLwgMtx+BIe VgZdvGQGKsrvHGDD31aMmldHjBM+DAOD8bf8LRIUo/Ln3czZ+IzI1DS4QGP5vfQTSLUR idpO74PCDPVmYd6N3atIsrYORy6w75KJTcGa7Ell/rYneenOAFE1Q5EMfcgusPxzOdy8 /loA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796251857; x=1796856657; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=E28wtJcSiWvo1eyxj6BT0OgcCokqxSXR0RjlWRt6V1s=; b=wrlBIk0MeR26ntiKO8Dg2P7Jy7ZIWy99n11VJKB+pEibxjpZCQBSW/bQei2tpDMavn pOveRzmpTFwyRa/9YbJrBtlctq8MEAbPe4d3Hxju+SEygDkaxoqaGi+xGRq7ZEjAxZxg Hn85jeAE2L7N7+LY8BGHfN3FfBIj5VmYyugG19N0iomdR50ORJtliUIQe+jNZzH0uK4Z ey7+3dHIfCzr0y2dQ7K9oLQiHsgdePp1hLc46IJLwm7JsfixSSuzNw1KrXD6M/bQ6mJc o4VYOwKERxqeG39s0+2HGwaite10yPwi3lZCXKzzs3fkPiNL5mHiPX6D+xvlgvFqKRXa /Q9w== X-Forwarded-Encrypted: i=1; AL+hErE8i1lRn0OvCZ7pBqi5LcaA0rp6zx8ok/hsF8J/i1myQX0K9Rx3r8wl3WHc+q7lhYG+YPyMb2/76sQtLrc=@vger.kernel.org X-Gm-Message-State: APuU4Z8wVlDtFCIU4v6Eud0QDzzfSbXBpHBcoKDPH73xdq6aPb/RMcSY p8VxEQAcI7kZraPKgptD/ctVCh7j3hyDM6g3FPfWJw/iuMdF25zaL8hY X-Gm-Gg: AZFdTZeeNUEZbQ7wjkiArr6mQIDuaKw0B8YFYCr5Ice/3V4jFPdH8SYCePlCvnDloPy sBN7xrOXETYctotCQ7t8PhaB4E0PYZcZ+7Ho99Rr/4DpYcmbMCyzpQrC9+JT6TQYinBIZ0/obOi TgGR32b+BqdM1/kyjMWG8Lkt5a8NECix7fiiy1bAp3cIOCZNPRjSjxbJjmwgMquX6aI/UngPQYt SPLtJ/L4szUJcGvCcX3nQZzv2GTn2WvQd6Uraws+GzOdIYzLsFdbiwZHvCa721QZIHxjXlAiXWm 4j4eBdjc7AAhplTuvPeJfPcJt+mwbTllyCAeFkG9DkO2LfuZ04bHo3sX+DI42HKa++kYrE8plL7 DN3SXB7F91CLtLQURoeVsIqae3WzZ0caJPMMD4q/BEjPCIMZ2UMfSOYtfx6vPl5SdrjFQF/UjBR 9q1DQY8q1XD3jJ8jDrk1u8Nnl/CyIdugdJZCI6/YCT67V65WXTgPJfJGDRNZp4cyZJ8Z4PDJGTv Ke6BbqH+EL8vdOyUymxZW+gNt/4ab5sjDpaBtOxoJDZlU/NdLZ0vqR41RtbuAaBlKr8jYbqLOy5 vNoeIc34Z8TSt+zMwcJ+7PwcMhMUoVH+J9B5DbNHjZfGYgyrXOlKSl/KmLbc9ZOL X-Received: by 2002:a05:600c:19d1:b0:49e:65f2:db64 with SMTP id 5b1f17b1804b1-4bbe197221amr3073035e9.5.1796251856751; Wed, 02 Dec 2026 14:50:56 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe007079fsm22041225e9.15.2026.12.02.14.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 14:50:56 -0800 (PST) Date: Wed, 2 Dec 2026 22:50:55 +0000 From: David Laight To: Mario Limonciello Cc: Anthony Pighin , Bjorn Helgaas , linux-pci@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Yazen Ghannam , stable@vger.kernel.org Subject: Re: [PATCH v2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports Message-ID: <20261202225055.4434ef2d@pumpkin> In-Reply-To: References: <20261201041109.2656367-1-anthony.pighin@nokia.com> <20261202170954.148541-1-anthony.pighin@nokia.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 2 Dec 2026 15:42:49 -0600 Mario Limonciello wrote: > On 12/2/26 11:09, Anthony Pighin wrote: > > AMD Family 17h Models 00h-0Fh processors are affected by erratum #1146, > > "PCIe DPC RP PIO Error Reporting May Not Function Correctly". The RP PIO > > SysError register in the DPC Extended Capability has inverted enable > > bits, so its zero reset value enables System Error reporting of RP PIO > > errors on every root port, and the processor may mishandle such a System > > Error. No fix is planned. The documented workaround is to program bits > > [18:0] of the register to 0x7_0707. > > > > With the register at zero, a config read to a root port whose link is > > down (e.g. after Link Disable or during an endpoint reset) completes > > with an RP PIO error that is escalated even when all RP PIO errors are > > masked. When that coincides with MMIO to an endpoint behind another root > > port of the same PCIe controller, the system takes a data fabric sync > > flood and resets. With the workaround, the same reads return all-ones > > and are logged by AER as Advisory Non-Fatal errors. > > > > Apply the workaround on Family 17h Models 00h-0Fh to root ports that > > implement the DPC RP Extensions, at enumeration and on resume, since the > > DPC state saved across suspend does not include this register. > > > > Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21 > > Cc: stable@vger.kernel.org > > Signed-off-by: Anthony Pighin > > --- > > v2: > > - Move the quirk to arch/x86/pci/fixup.c and limit it to Family 17h > > Models 00h-0Fh, the family we were able to test on. On a part without > > the inverted register, writing 0x7_0707 would enable the escalation > > rather than disable it. > > - Erratum #1146 also appears to affect Family 17h Models 30h-3Fh > > (revision guide 56323), whose root ports are 1022:1483. That ID is > > shared with parts the guide does not cover, and we have no way to test > > them directly, so extending the quirk is left for future work. > > > > v1: https://lore.kernel.org/r/20261201041109.2656367-1-anthony.pighin@nokia.com > > > > arch/x86/pci/fixup.c | 27 +++++++++++++++++++++++++++ > > 1 file changed, 27 insertions(+) > > > > diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c > > index 795d81c7a4de..c3d008e0032a 100644 > > --- a/arch/x86/pci/fixup.c > > +++ b/arch/x86/pci/fixup.c > > @@ -1180,3 +1180,30 @@ static void quirk_tuxeo_rp_d3(struct pci_dev *pdev) > > } > > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3); > > #endif /* CONFIG_SUSPEND */ > > + > > +/* > > + * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The > > + * DPC RP PIO SysError register has inverted enable bits, so its zero reset > > + * value escalates Root Port PIO errors to a System Error that the processor > > + * may mishandle. Write the documented value to disable the escalation. > > + */ > > +static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev) > > +{ > > + u16 dpc, val; > > + > > + if (boot_cpu_data.x86 != 0x17 || boot_cpu_data.x86_model > 0x0f) > > + return; > > My current feeling is we don't need this check. 0x1453 should only be > in this system. > > > + > > + dpc = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC); > > + if (!dpc) > > + return; > > + > > + pci_read_config_word(dev, dpc + PCI_EXP_DPC_CAP, &val); > > + if (!(val & PCI_EXP_DPC_CAP_RP_EXT)) > > + return; > > + > > + pci_write_config_dword(dev, dpc + PCI_EXP_DPC_RP_PIO_SYSERROR, 0x00070707); > > + pci_info(dev, "AMD erratum #1146: disable DPC RP PIO System Error escalation\n"); > > +} > > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror); > > +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror); > > Can you do a second commit that adds the other platform you identified > from errata? I would prefer they're separate so that in case there is a > regression we can revert one without affecting both. > > From what I can tell 0x1483 is used in a system besides 17h/30h, but I > would expect this errata is technically tied to the PCI IP (NBIO) and > the reuse in another system would mean this errata applies to that as well. > > By doing a second commit we can at least clean up if that turns out to > be a bad assumption. > Even if the workaround isn't actually applied, the list of devices it might apply to ought to be somewhere other than just in the email. At least that would give someone who hits the issue later a reasonable chance of deciding that the fix does affect their device. Otherwise the info just gets lost. David