From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796251859; b=I2Cl3YVKfAleo/Js+QvLUvvHBYvtiTeA+HZ33y7HK7Jn6gaARgkcSEA9tvxcY+6yan6K WRtHwDsFbPy3hpsP/nkftNTUwtysDmlGm+PBo6P3RZzpG1n3ni2U3FWF5J3qA9Qhl975E UvsygZl2jmFC/nVPRtwDuu8Peez+cWjEHVPp7DY/T7ZVf5xzQtlji+SXo9tec2xPb+2hY FmP9ctBBVIHySFvLiP8smBcSYD7TBhXtxIuiKEE3IdR9xqsH6EO5TPe6paMI2+Axvw13u 7N3xM2/fs0jqr90Z6oPqQ8TR0Te5K/Yqr+YYAhdKkLVH1y4uc8UHbp/yzJLwNeg0t7A== 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=It0fvA87ukOCQ6VT6oBQiL0ZDh9S5CpnI/cUF4Wgs42sCGPEEe48ar9kgcFF6HVmoJgI YEj52CxliYgyqJBr5MU9HQ+rtLMXLZ36VrNZvbtpCa9lNcEdLH0Z517fC+r3ySWcJr0NC bw8Pl00RpyXlqJpTYtXZl+0UL7srkxVbK2lG1qZ3HpTuLAcq/S+0mrS9QmfQ5U5Vep63f 9ePxWTGecdrNrau32Qj9P78ZxgAuIwaS+U9vzmUbk/pZ+P3k7yjFvcTUejui1pUR0piG5 ypmVFEwlEzqRMk7dD3TenIJkrdtL9Tu95bpfRo+EMnzTkPR2H0vsZaIIshxgDJeIHpw== 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.44 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 7B99C606A32D for ; Wed, 2 Dec 2026 22:50:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7B99C606A32D 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-f44.google.com with SMTP id 5b1f17b1804b1-4bb55cda775so2019915e9.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=nJVwnUm7H7QWeL2nCVyikKIdns05m0Gf3DkRpHfz8K1h4+C8HZ+v7R75GARdg/ixLF EhSAgOmeiJ1zqStWNX6BwPDg1DOHGw1WMb+u/ffFZYnsUmP0qeImM5ZUSEmgn98WQo3w 4fPGfzZMRcacQQ+fOTjyA0DHKOIxJz5sGEsCxBpsM6L2iUA9Q/7qrGjhPcu36Ge/+wd+ XbL+na4upZtCsVW8RAcR8q0UmJ0ZLfPj3c4HsWYjrNfWLa8PTSzXq4QFvjr/UJLQ96B7 Kkq1Ur/qyiUnHHnSXc9TYx0a2Msi3Ish9I+RaoBH2u4uPmGj80bXboFPRTGxH6/x9oBU VvlQ== X-Forwarded-Encrypted: i=1; AL+hErG/vnoUtE2Mi8FlvGn7T/sb13Y2fwssVdyfktdxdRE6sii58fvFVrlnkE8mk0OOVN9V3Kr95WmhO74=@vger.kernel.org X-Gm-Message-State: APuU4Z+I4tgmueFE9tpOWcg5bqqGavHBj4b0xSuvssbPTDYYRsBn7s/L 20j2akZXGiZwN1kA0ew105man2b3DHp9eWhK3oQqrNExkjFZQyzv/8jZ X-Gm-Gg: AZFdTZeJPEZTqpLnT2XKaTpI0nDes0LiQ4MViI1jIZ/u7xhrCa3SZAQ5as8APniFhtU 625SRpVl3VvUDlx/oKJcoAAg7I/n9k9H1XjLuecV8CGX6+0MdowcM3JbaPqhvHzc3HiE4d6O+md 6WlYkQcJhKSwcNwj/AD3NAROGyIRlpFiin9JhqmdS723zYFuGbiiPmi5vOFplHWBYWzOxhefZ+s kZddFr+U/EvR5U32plkai3CyBNoM7AzQJs6nAKhPJTC+gbZIvh8y/WkNLqASUYYmxeyfqgomgeZ tiYpZy1VcIoqaiiLR856CaIP20/vXWTxPbhkOpatye+IoXxa7WENTVPtInuOzRLIzSg0USI9c7n Wve2NB7hv6zDamevPxJDRGOavbHIHZIkF7SOTYC8DBtGX1+0r+6v6O/8K4sZ1hqcNXBZxAIqjBl GqKfcWBDIZn3dpMgo133nFhLj3n5vXDbwFZz2cR927+Eu2T8k5kEH9cOeSAXl6XTlu9uNOOPyab 8mf6OcRrfsFzJM8CGC/jDfMuaSw+ZrD288Ia1QY0C+8JXWbjwiYGpAXJY+XReAO6Rtwa6V2yAne /k3GkOFR/bNr6RupQ0IPJit77pX5elzJNwMCf4qBfpjCHlSWa/NHBkeo6rJYTilE 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-pci@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