From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.56.42 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796231407; b=fidvOsSwdDe2zbbKp7TnnXZDuIQVlC5mX/ZJQsPSN8XXmZY88LRTmR0TZ1Lt2tVhj+Tz JCoZjBYhvNaD/Y3xAwSjZiep5oodvM+Ox/E+aHQSMiPTY4w9QEZ2netZQVM5A2SoFYmxm wBGrTnWGYs1DxEjmqW80kpqOqHbShTzU4JHOP0HURa7+JMelGG6f5x7NEKx8KkBbQlAeA 2D6t7seAvn9ShAwTrYDJZEzPAElI7B1lvaQp/X9RasZj1wJzx9aqgsTLXzKaoRax6mhhg aT+3TAnzu59YvasSfnrtD5/9F5o5hAiC1ld//3m3TbtDzrqSMCswNtAOYSY2K3Lh7eQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796231407; h=DMARC-Filter:DKIM-Signature:Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=60Dve0+Qr18ayYQm5aCIesmIcUb4MfRQ5SsqBjD9sDU=; b=ixc3hqwJyWLGiEZgeOrjmXrBmQNSV0Q5numLIouxLaXbpIpTFuUCbOkRAJ1QNITmQhVZ X4i4TO70NhrYFBBJO0kRxFRyf9vDZvuu0Ii0bZvYP/9crnjvnrB897BfzttE1c9fgn6uc XDuPpzqPZu3ZPZDGUNY0Xg+IZG4S1K8Lg8kc/T6GxWf1DCY9RoSc+mePWTQoPuhbnAJbE fBWY3N82kk6+f2rmj5oBnzWBF1RTDk0RUSYkwnoWfZi05iL26MXreirH00+X8RCRInppx P4clWmD5ItBbYwTveS6Oa8ek4jgVfgUWcBD/wf+g3ervk5EGyqodzFM7uUfiMCPW0Gg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=nokia.com; spf=fail smtp.mailfrom=nokia.com; dkim=pass header.d=nokia.com header.i=@nokia.com header.a=rsa-sha256 header.s=selector1 header.b=fleK+isp; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.56.42 Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11010042.outbound.protection.outlook.com [52.101.56.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8511F606A323; Wed, 2 Dec 2026 17:10:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8511F606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nokia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=nokia.com header.i=@nokia.com header.a=rsa-sha256 header.s=selector1 header.b=fleK+isp ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Gk7swRvccM0pcyZt3cQz9siLz8ulsU3LBltk2tgzMh8AtRnwxhOTvCMAszTPJPycMES5rtmkm8G/5kn0ILSkvfykX+Q6b6hDoG84zR/8nW8BT6DVnjeNryvn/1AQucG5HIzvMoSQmJVrsjmldXMht8a0AO0CNUlvC5AJAkHHHAksKwOBzmn5HgrdZC9Na4th6o1IjUCm9e6QglN1FSzqAzc0epmUl+3yZ7KrVQ3CMRVZIACLyJRlQEAeDr5SFoe0MFyO7c5AhInuO0rloBXMd0AV1jqaMktRMvYBJ+SyjhtG9zUrMytuZ2EFQlQ7URy2T5k/QnIdqjlUndjEpIhUtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=60Dve0+Qr18ayYQm5aCIesmIcUb4MfRQ5SsqBjD9sDU=; b=kZAWqFh55XSAPTeCy5aaXLqH0SI9dezeRtvNRovmkJJ54hQR2Yh1e6DdzdCSFAbAbL+aYw3t6o87+4Pv1qtdwe4AnHcgr5RuuNWBhGbNjkN5TFlfSPYze43J7Ah1TAXUDrOmOHm68LGKbLLKS3Wq4pzITgCPVpZi81pFxqlvXnreEW83mOVwea3fO64LeLkv6doJzKeDf5WwTm6u+JpSNsXaucdRk2lulY0yX5uoeurHnyWxame946iCAdor0JIIrNCZkkccO9jdmykN/GcLDcLeuWIBdTMd1eSAkdXH9Q4Cdd9htHFUEybenz5CXunELsI97IFAyPpeEIekemMatQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=60Dve0+Qr18ayYQm5aCIesmIcUb4MfRQ5SsqBjD9sDU=; b=fleK+isp+yym6wxW2SZeEIiyKN/zh7XslcNDdjDFzxcnsYkxvCJn9IJ9G6MPvDiUISVp6zW4Tgq8+wVcnpUt+VoNOkSZBQsqrFMPS9EQPFmwXSdeUD0SLXoSFjl3ricHHwfG6z2iQtjb47f9xTQ462NoJnyj4cQMlUQnXL3QOP8B0zYN7OY0g2XJdje0gAW12Z1os/+qQ27sqv/ASSDNcgqxJjIbpB0C040cqKGUu7UHfnFMHwsdksePb0gDJRlA+dHjw0VxLzrXonad554OcV2TuZaGEr/UZGAwirf9vr0r65UjnrGYyZZv/ZepawZRab/HTNe75u9nAQioMD2uqw== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nokia.com; Received: from BN0PR08MB6951.namprd08.prod.outlook.com (2603:10b6:408:128::14) by DS0PR08MB10323.namprd08.prod.outlook.com (2603:10b6:8:1f4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Wed, 2 Dec 2026 17:09:58 +0000 Received: from BN0PR08MB6951.namprd08.prod.outlook.com ([fe80::4dd1:e1e:56b0:b178]) by BN0PR08MB6951.namprd08.prod.outlook.com ([fe80::4dd1:e1e:56b0:b178%4]) with mapi id 15.21.0688.010; Wed, 2 Dec 2026 17:09:58 +0000 From: Anthony Pighin To: Bjorn Helgaas , linux-pci@vger.kernel.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Mario Limonciello , Yazen Ghannam , stable@vger.kernel.org Subject: [PATCH v2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports Date: Wed, 2 Dec 2026 12:09:54 -0500 Message-ID: <20261202170954.148541-1-anthony.pighin@nokia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261201041109.2656367-1-anthony.pighin@nokia.com> References: <20261201041109.2656367-1-anthony.pighin@nokia.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA1P222CA0149.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c2::26) To BN0PR08MB6951.namprd08.prod.outlook.com (2603:10b6:408:128::14) 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 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN0PR08MB6951:EE_|DS0PR08MB10323:EE_ X-MS-Office365-Filtering-Correlation-Id: 42c79490-9ee9-426a-5cda-08df509717f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|366016|1800799024|376014|11063799006|18002099003|6133799003|261009223027099003|22082099003|10067099003|56012099006|261022075727099003|261022113327099003|261102123227099003|261102124527099003|261026121527099003|261021123027099003|261021121427099003; X-Microsoft-Antispam-Message-Info: nOLDkWzE/uW7I5662aX80FZ83uCOtXt5JIjQfycVh120PnVOBrAvgdcIUxmXv+HeSdwZ73Nz9V0Pl89hoX++Rp6tIzS9R56ZYOPr95p9jcpoDfHVsZYyAcIXBMIegw+cRPlqEI256+ME0XmcdJx4/21C3CurkQTf6C7Y3Bu84fgFLRJQlzxxxl88xNK4zbu848WdVf3nYfLM3ywULkgpOC/B/bAWVt5A7KDZ8X2qswMQVM0uZK37b/e5Gq4cLbuhm8CNFlvcGhIY6Tkp3nM51XjhPItNQHHFWMhP2cxHFAzCAvZ94ctSjWT9tx0S5SSKVcUnBfLhp21rffNW7UQ2HKpJFSPHu2Qme1c/bMQB0KmUX2t2wkRo2kGydD2R5QrmcXiA9KSqgAy+q8BRAPfl1mEyqy3qqi/8DhBcJpzpTDTGJhgxy4o0kKLIYyYN06/JltMPwf5NcST/cWRiAy5w6qMpQkuPTLh4zJkXF1hKNswomxkl2G2jKPv9qdIcb+YGU+9Xkaw3HCP9SftDkau+fzhpZW2mJMKYLFzTN0GfgtCSFtbET/FbIWDRmqAgOvf3mbOqPOIUOD4S9CLbB86kwg+jXp/DND4MmXwHAOcjwvqOxjVrSY/MUxaSfcHZXibT X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR08MB6951.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(366016)(1800799024)(376014)(11063799006)(18002099003)(6133799003)(261009223027099003)(22082099003)(10067099003)(56012099006)(261022075727099003)(261022113327099003)(261102123227099003)(261102124527099003)(261026121527099003)(261021123027099003)(261021121427099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?WaUv6vAjmi9gAwQQljQ5qxuB7ryKHGj5CntEuLxf9PfRHQKA3QTNpAFbbbaM?= =?us-ascii?Q?N+ASTRbYI60gidEQZzmeq9oWdB40TwX/u1HhRA9O39YWM8CBK5XyegVPCwnc?= =?us-ascii?Q?Cd2IWfxTtcw/PkszFESVxSn2MzQ0wS1xzKdPJGSqCGQwuHG3qDA/E2CkimpR?= =?us-ascii?Q?MqAXGpkpORNXO3Dp6lyiivTiouC1V7XQDmAxw63hu2kbpEhfCoC8O/QyGWq6?= =?us-ascii?Q?2FWXwdGQqFLEsfXPzB5eQOT3owv9Dn2PvTtFwoIkjIFtrFVWO+5mbgCBDdwd?= =?us-ascii?Q?1HhJGudlYxhUc8JbsPo5oBbv0xUQSI/cnFPrYG7M9dfJ2Pf6cw3lta1DBBbS?= =?us-ascii?Q?bvBKVK+cnd7Q6U40zs3d3jmgt1dBP8ihQxHX4OcK/FSVut7iMlh+jECQpBQA?= =?us-ascii?Q?krHn/AZBFp25Ti8OZvYXhoPBdZ33aW+V6ylVgEPRk8fiRfZk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wZD8qcqmqfzut7oYCFRsMKsmobyyh8fyXdf?= =?us-ascii?Q?b0+xAKWuoExRUAJu04xggJJ7bIRQeQi3cWYe5RCij+Oo1+zrLz2/qfY6u8cD?= =?us-ascii?Q?FSKOh3LXaPdG8H8MsEF3kEwQb9R5+y/aMgPhumeOD9mNA+ArenhcIyrjHpd1?= =?us-ascii?Q?2wiHQhb1bxDsmspOF1L/b6F36kJ5SJ5OGHPLsOEmBXvPue2FK9e88HOoacHX?= =?us-ascii?Q?6yM8M04k1kG299O9rUHNQ32/h5JP6hkY82uPf/qfv2ruphskbUu0TgEL/Nsu?= =?us-ascii?Q?iuCEqDhlqRJM7C05e46p9MBnjuSuW7RD/Nq5lnao2RcIu1iSRB70/LwMQ0ns?= =?us-ascii?Q?AeAgfPhP3SfRk6yALcbsTzpHMFsJH0L07AEISNq2vVoAFuhk+ZM46ixBh++b?= =?us-ascii?Q?h3zOLkhdjQ=3D=3D?= X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42c79490-9ee9-426a-5cda-08df509717f5 X-MS-Exchange-CrossTenant-AuthSource: BN0PR08MB6951.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 17:09:58.5624 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zjfNE3/aXCXbkA/MkNsE770sWhapXlz0LGMRThY2AVRCRTKaH97MIHjfOboCWb7VVBhqjDV9hnNkxm5aavjp+t4Cc7GbZJ4HHL7jXIL1KgM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR08MB10323 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; + + 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); -- 2.43.0