From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796251859; b=5b1H3Ubtho6tn0al3kyjlCnndLsNM4/VsyBJc5gDvXlq63jz0VdR4mrNMtGBw0B6HYYC CZnQcQF3K5oCsq/ut98fVLXppDv6EW3OjSr168xo9Mxj6lYU51UpDh6B5mQDLUIb02xrh N41LQ171taA4zBk7tYCix3CutZRNnvJ0nBk/wF4dMd+xffEKahCnLrl0/6Jbw3A1WZfXy OcWF0i6gedveeduszMTpONhnNCD8xtmdt+0ARSlF2CNMt8uXWvW4dMNgnTdzb7XzzK0ZA vm0pLHCWbCa/tVCpNNqIzu2vIgInpn51UNlmpEpySvQb9Xl/UsFDu/DjWfwnpvvJd7Q== 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=dbHKvQPQRHUAxKepNlWXQb2CD0AOUv2eP+AC/t0jww1nUZ3XUkT/1xiqVYNanXEquZX+ edMPWbZZGdyEbiwKZznmIFQELRezbzoauHWcq/Ttazh0dzDhwlLkNIWp4v4WZd0/IN6CD jx1pdJOIodlNETy6ik/5I5j6AdivaDqIUsdBJ86WEp/JDcGXWWPVc3of7+oA8WJx8jW/B ooDadl6q5rWT/qUKKGkRDz9jocpkvj0/90UVSnMeMm29U/4Gog6qk/gAaV2Ri4uTSQiRc YYNVliEsJIit1IGjg9eAdbIX65mHxxwRRulIdXQtHAKAes9tO+/t4gVszjNoq+9SXtQ== 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.43 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 79C5F606A322 for ; Wed, 2 Dec 2026 22:50:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 79C5F606A322 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-f43.google.com with SMTP id 5b1f17b1804b1-4bb55cda775so2019925e9.0 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=A2kCffPtvguNAzzgbOgBBcYpn9EWqT19BgGNeP5gHIulcISX8H5zOSKoBwk1qbRJEB jAk9uqqt+O6x2jTEhGpyzmiv7BUWrnIiPyMWmnncJRO3GQ9aqyF3ndykOCALqlZacNYF uAHXUouBEd8n2nZ/ddoOlnXEqi1RISHUYR+GNg9LaOkRWbKNbDdkTxPDkPOvSipjHjev acmb/Kyopa/neOPmP+K1ZXR/2VioH4UKMeYGOgx6gwC9SYaQ7+PNbdSBL2JjPHpag3UN EnJJMmQGt0qBw8pibS3Q3PHcaWFt0ueD/g+v/6hUEhFRoI/iBIut+9YtEzo3okTfFM7W SnLQ== X-Forwarded-Encrypted: i=1; AL+hErEwVn2QToEFtxECSjuzftFgVK8kq9qbddPG0xPujKJqv2vmEDqGHrzA9cXNcSeZ+Z1gV1JiO4U=@vger.kernel.org X-Gm-Message-State: APuU4Z9etavOuo54Xzy0+X2laIy07LwcoIOb0r+KorHbxpZgC9+PlhfF 14kW6G2VpUKx5R+Ud8TEfTd5kdh1FX2mDCBEB6DoHzi6+tqrYLwTCESa X-Gm-Gg: AZFdTZcnOslXADkq+whdvvrKSzCn4stxrY9V2MNFluNG7yBdLNbXHT146Mv3ifh0DTf KWmHV6AZi6B6ScVlT7KVMvTm73wIIGj1emPQ+sm0VAXK+wcrfqlm/36xnMrOXN2qY58WfiGNcCW 61AuAgYVU8h7gZK2j/xts502uOuo06bI7p0abl0uh3VhpM49nQJrHq1ubsJ0xv5Hy713qt+KMUc AB8v+33m/NMSqmCufVlkcmm41V/N1iK7uFLY9cYdCMCXOU8nT6bPiaCIeqOqaK7m7s/S///b/oN jJEntKsBggyC1o1hXRFDcl0LvZRdjStuECiwWez2qzAu8pHxxcSuynj7ZGSJsxqR+QcmJzuqJcB pNw/2/vPoWAZvg2qJ1xZH8+jDvxHisJ1lMKvvvR1IcZD23p31XzRevjSmkCeJlTLL+OH90dsktD Z2oFq2PWQIt+k6VBmVRQ5otgkH92pik0OQteT7Oxdc1mTTXvVotgOBNrFyYieWzoZYxvoMeqren XELzgW7SLcYhGFR8vK9HnYruiaCy0fMEO067ru7ZgG7uOUyITdyVfxxV4OZjtDy2JKEFA8HT6lc dR08TI196ikDbUMLJDAxsso1Hrpd80i9hi1Gz9tPCN8Q1FtcvjpT+EcUkgqAce8A 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: stable@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