From patchwork Thu Sep 7 19:19:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Cheatham X-Patchwork-Id: 13376831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB34FEC8757 for ; Thu, 7 Sep 2023 19:21:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231997AbjIGTVC (ORCPT ); Thu, 7 Sep 2023 15:21:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjIGTVC (ORCPT ); Thu, 7 Sep 2023 15:21:02 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2080.outbound.protection.outlook.com [40.107.212.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8769DCC; Thu, 7 Sep 2023 12:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ie8SrLma7CrJtJAFpo/9E44VEviI3KACAGObGRSHGasBHms6f9q/Sr3Y0k0wAonetQBZvVdBV+1Ezj3X0NNbXRf+MZW4AZuW2Dqcpug+3QYOTP0WoU7NmV908mw0Lydy0LGTZAdhMdAD0A24fgrtX6vmEjPTmMi4yEk8rNa8QJ1VL9o1ZhDV/RZvibZvGBEli2bwx7hhvU/Yoha1MOY2/N9jYSUbwreNZe3CoEhUgv8nZtYp+Pn1X/+/Bt2oFpuENRZ+/8CNCogPkRSQI1w5oiAlswFNcGY0jGf3MrRZsZFSjCDqc+b9UWVZTkjLznZaSSUa+q4yCbueR64wXJkgfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=BQAWG11tuzHRhowvg8nWv5VCKb+ZuhiNuVv3B8lZdxg=; b=ewx/oXs6ff9neEFFtXSrGfwTFMDS0Gi2Gnbb1im53bvJWbTXBK1s856CnjxP3zAyMJkGArrSc5Gmb6EfCG7w9PG0yPdxelRfSNoFvDbpXVYNhYHKUOptcG8UrCEM3sErbKMsivDOiPfsYIUZDvtzf6X4kbYYKNJQZSfQlgKKjH5tB3V8yUPRo8QKxCdvuklzdG7ykKCY02YeNGgaA6faVnjBLkYn1/SNcjVln6BLm5cis/XsRKgvxM5M0QvKf+VpLWt6z/4sHD4wLd+HQ540YcceIlqoS5xSlEYjCIaYPQtOOsVQl3pqp135LKjy2Cd8fOQEA/p4J1qG+03zpAuing== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BQAWG11tuzHRhowvg8nWv5VCKb+ZuhiNuVv3B8lZdxg=; b=YZ7T2JVllbxdsiFiAyCH5CtRayDipvB/mFUpdfEokfBTGv1EQkGPtkEEJISXqReKUxcWJMhWXGoRT8UjpNj9bJpzMwMq1NJMgdb50isIfcm20EF6FAW27zRjHuxljgIjMgjSTn9AT3eSyyWoI4hO9k4fpqQd8jEv1RzSXjQplHI= Received: from PA7P264CA0124.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:36e::9) by SJ2PR12MB8062.namprd12.prod.outlook.com (2603:10b6:a03:4c8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 19:20:52 +0000 Received: from SN1PEPF00026369.namprd02.prod.outlook.com (2603:10a6:102:36e:cafe::82) by PA7P264CA0124.outlook.office365.com (2603:10a6:102:36e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30 via Frontend Transport; Thu, 7 Sep 2023 19:20:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF00026369.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6768.25 via Frontend Transport; Thu, 7 Sep 2023 19:20:51 +0000 Received: from bcheatha-HP-EliteBook-845-G8-Notebook-PC.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 7 Sep 2023 14:20:49 -0500 From: Ben Cheatham To: , , , CC: , , Subject: [PATCH v4 1/3] CXL, PCIE: Add cxl_rcrb_addr file to dport_dev Date: Thu, 7 Sep 2023 14:19:54 -0500 Message-ID: <20230907191956.674833-2-Benjamin.Cheatham@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230907191956.674833-1-Benjamin.Cheatham@amd.com> References: <20230907191956.674833-1-Benjamin.Cheatham@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00026369:EE_|SJ2PR12MB8062:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a522b34-ec3b-4233-9533-08dbafd78cc8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DNlDEO83RUXtdUoc+EE+7zqDsWtiqRiizKtAL+crhW33wjgiwrMoL9Zh0iONudGatEdIGo4dEc51l7nwdH7Fnie0F1UGKsjgovKlnr1GNG87OniNO/6eBkCAVTN14fjiijv1sU1Fm7PwWUk+20iIj9SiRdQy/VbjPXZUDS06PtXKdQYRB4YxhAEBdEzph2kNNRRG3da6V0qmNHD5pJG00q98AZ1R3/wJqPuQFJLiIhFioF0t9MkBar06rGi1Z8fgvFGc9Q5twWu5UoZsjAniwzhX8OuTMOR7Dx4m0bj5TpMz8Djf6Tdxh0Dkf6IRQGp4Vz+czHCzDVJyrBpL7qs/U8fZ4vtDGOcwlBBg6jmnJKDjJtgeN+oJq0TctLiPK0iUkcs0i/Mnk2tGw3jx8X1tTuw5WlgffJB5fWhuHxp24L1+mnoYGQgIqXiyCSzLAwMesc416szX5RvH+aXGg978QLixEjkOAS6G/hqRsRdGDaMpEckwaBedKWAME7hPsu1B2rJVSXyVYLWm9m9fM2CS1ftoRKYUY+CcDyY6C2bCtBzSv/C1DC+viOI/sqIT2iLgzWXc43z8oUkDpMEQ8ZjCJESEveerQB0HRYWB7kmw8bI/BWDGud7rMPG/jMeUP0NhcnntrpXHHSaP5w/cbczRQXRIpjS3VQ0sS5M6X9l0PmIzM5oeGH6N2Ttm92LfiaEF0WLIH697RoaSZioaOmMcIB5y/V/2gNpYRytizEafDEFFj1jsxRGYnW94KgbNJc3/MS8ejUsQG3wpJFyI1QbhHA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(39860400002)(396003)(136003)(376002)(82310400011)(186009)(1800799009)(451199024)(46966006)(40470700004)(36840700001)(36860700001)(82740400003)(2616005)(40460700003)(81166007)(26005)(16526019)(356005)(1076003)(7696005)(47076005)(36756003)(426003)(336012)(40480700001)(83380400001)(478600001)(8676002)(4326008)(8936002)(70586007)(70206006)(110136005)(5660300002)(54906003)(86362001)(316002)(2906002)(6666004)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 19:20:51.7217 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a522b34-ec3b-4233-9533-08dbafd78cc8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00026369.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8062 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org Add cxl_rcrb_addr to the dport_dev (normally represented by a pcie device) for CXL RCH root ports. The file will print the RCRB base MMIO address of the root port when read and will be used by users looking to inject CXL EINJ error types for RCH hosts. Signed-off-by: Ben Cheatham --- Documentation/ABI/testing/sysfs-bus-cxl | 8 ++++++ drivers/cxl/acpi.c | 2 ++ drivers/cxl/core/port.c | 33 +++++++++++++++++++++++++ drivers/cxl/cxl.h | 2 ++ 4 files changed, 45 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-cxl b/Documentation/ABI/testing/sysfs-bus-cxl index 087f762ebfd5..a7d169235543 100644 --- a/Documentation/ABI/testing/sysfs-bus-cxl +++ b/Documentation/ABI/testing/sysfs-bus-cxl @@ -177,6 +177,14 @@ Description: integer reflects the hardware port unique-id used in the hardware decoder target list. +What: /sys/bus/cxl/devices/portX/dportY/cxl_rcrb_addr +Date: August, 2023 +KernelVersion: v6.6 +Contact: linux-cxl@vger.kernel.org +Description: + (RO) The 'cxl_rcrb_addr' device file gives the MMIO base address + of the RCRB of the corresponding CXL 1.1 downstream port. Only + present for CXL 1.1 dports. What: /sys/bus/cxl/devices/decoderX.Y Date: June, 2021 diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c index d1c559879dcc..3e2ca946bf47 100644 --- a/drivers/cxl/acpi.c +++ b/drivers/cxl/acpi.c @@ -676,6 +676,8 @@ static int cxl_acpi_probe(struct platform_device *pdev) if (IS_ERR(root_port)) return PTR_ERR(root_port); + set_cxl_root(root_port); + rc = bus_for_each_dev(adev->dev.bus, NULL, root_port, add_host_bridge_dport); if (rc < 0) diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c index 724be8448eb4..001ab8742e21 100644 --- a/drivers/cxl/core/port.c +++ b/drivers/cxl/core/port.c @@ -875,6 +875,14 @@ struct cxl_port *find_cxl_root(struct cxl_port *port) } EXPORT_SYMBOL_NS_GPL(find_cxl_root, CXL); +static struct cxl_port *cxl_root; + +void set_cxl_root(struct cxl_port *root_port) +{ + cxl_root = root_port; +} +EXPORT_SYMBOL_NS_GPL(set_cxl_root, CXL); + static struct cxl_dport *find_dport(struct cxl_port *port, int id) { struct cxl_dport *dport; @@ -930,11 +938,30 @@ static void cond_cxl_root_unlock(struct cxl_port *port) device_unlock(&port->dev); } +static ssize_t cxl_rcrb_addr_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct cxl_dport *dport; + + if (!cxl_root) + return -ENODEV; + + dport = cxl_find_dport_by_dev(cxl_root, dev); + if (!dport) + return -ENODEV; + + return sysfs_emit(buf, "0x%llx\n", (u64) dport->rcrb.base); +} +DEVICE_ATTR_RO(cxl_rcrb_addr); + static void cxl_dport_remove(void *data) { struct cxl_dport *dport = data; struct cxl_port *port = dport->port; + if (dport->rch) + device_remove_file(dport->dport_dev, &dev_attr_cxl_rcrb_addr); + xa_erase(&port->dports, (unsigned long) dport->dport_dev); put_device(dport->dport_dev); } @@ -1021,6 +1048,12 @@ __devm_cxl_add_dport(struct cxl_port *port, struct device *dport_dev, if (rc) return ERR_PTR(rc); + if (dport->rch && dport->rcrb.base != CXL_RESOURCE_NONE) { + rc = device_create_file(dport_dev, &dev_attr_cxl_rcrb_addr); + if (rc) + return ERR_PTR(rc); + } + return dport; } diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 76d92561af29..4d5bce4bae7e 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -690,6 +690,8 @@ struct cxl_port *devm_cxl_add_port(struct device *host, resource_size_t component_reg_phys, struct cxl_dport *parent_dport); struct cxl_port *find_cxl_root(struct cxl_port *port); +void set_cxl_root(struct cxl_port *root_port); + int devm_cxl_enumerate_ports(struct cxl_memdev *cxlmd); void cxl_bus_rescan(void); void cxl_bus_drain(void); From patchwork Thu Sep 7 19:19:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Cheatham X-Patchwork-Id: 13376832 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BF3CEC8750 for ; Thu, 7 Sep 2023 19:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236412AbjIGTVU (ORCPT ); Thu, 7 Sep 2023 15:21:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234502AbjIGTVU (ORCPT ); Thu, 7 Sep 2023 15:21:20 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2079.outbound.protection.outlook.com [40.107.220.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBE891739; Thu, 7 Sep 2023 12:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I/vNLP43Odety7dArVTdocicMlKajj/M/yDsr50ZXs8VYOT54dnMcL8xoo3PVnsamQ8qufibzdemO4RZWLiSCxaCIzGZZ9/8++VeyH3D31Gwnj2mBTd2YlCXi8rT0gTM3JRZ6oe02SkQoIwQR0PcKDQfVcoXiLtxQed4ct4scBg4LmRQozqH5bt7d/meyx7N24FtiBftDeMOGQdxefO5Win+u29QgGX81/ptXhMjbraFKLmsmwhOUo3+nYgVt52qPjjr2FNfn69QW/RyMvr/cXyaucwg/c6BOtyvkERaK3mkcrkK7S8i/W9R0qVSb54a+5cz6ci+UMgS4Po+7ryNkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=oxVqRzgj/sUzHAH3Mn0ZvlxKfmt02ssVJyEQm2AGtgk=; b=BaD/E22hrZ99llZxZvJFf3Z8ug4N0eEMZ24yJPvBNX1SkIgLHr2SRpzDSpNv3v79xwm15m7ckh7A90rs4w+iNiTCMUVaCx+Q1vUlaanY84vCJ0X/WDC4wjfMr+nOUo3rxSptQ6O3tUoui6JW2iM6V+nkSjZ7rFH1R9hTV3iIO4/U+q/XZN3e+kBMvySHiMXjzJDLiKCpzMtceMOgiJuAoTzixU2MtmezvQevgmP2/95uJYHiHlyWjxjIEAsHUXyC/3hpLt0LExogPZSdciG3tH1ENSs79LNWRfiZSSEj0GLz5i3qVju4dl5SXAklEwoZzZ/7S02hPQOFr6VIDC2vkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oxVqRzgj/sUzHAH3Mn0ZvlxKfmt02ssVJyEQm2AGtgk=; b=Z6fhHDHekAlGKG6r69DpvAlGdJgw5Qdh8GnMyMrqP/LgdOIXQgq7HCD24wVQQ2xDmgPjzVpsQs+OT6pDaMTX2YTV6uiLgjl/1G7GA1YZlGFnb0AjijFVRrVZ9Fv63KtRKgs8pXzEADK+2N4UBTT/XfcDQMh8+tAPi7jtzGcQnOA= Received: from SN4PR0501CA0019.namprd05.prod.outlook.com (2603:10b6:803:40::32) by CH2PR12MB4892.namprd12.prod.outlook.com (2603:10b6:610:65::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 19:21:06 +0000 Received: from SN1PEPF0002636B.namprd02.prod.outlook.com (2603:10b6:803:40:cafe::a8) by SN4PR0501CA0019.outlook.office365.com (2603:10b6:803:40::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.10 via Frontend Transport; Thu, 7 Sep 2023 19:21:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636B.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6768.25 via Frontend Transport; Thu, 7 Sep 2023 19:21:06 +0000 Received: from bcheatha-HP-EliteBook-845-G8-Notebook-PC.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 7 Sep 2023 14:21:05 -0500 From: Ben Cheatham To: , , , CC: , , Subject: [PATCH v4 2/3] ACPI, APEI, EINJ: Add CXL 1.1 EINJ error type support Date: Thu, 7 Sep 2023 14:19:55 -0500 Message-ID: <20230907191956.674833-3-Benjamin.Cheatham@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230907191956.674833-1-Benjamin.Cheatham@amd.com> References: <20230907191956.674833-1-Benjamin.Cheatham@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636B:EE_|CH2PR12MB4892:EE_ X-MS-Office365-Filtering-Correlation-Id: d45ce91b-4098-421e-eb86-08dbafd79579 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r9kzyZtSxZTyT/bBz52gMXXynoiJ6gzkDSZwOSZBWwULFJzScEEVShHwTtQxWuQPrzShh66AUHOAlDp9DEx71ve/fu4dMNjP1jScgwD0GRvz64rdnETN6U7Kvo1rd6Q1lUbBmy/RUTRIrjweWerACm6xFCNkBNMgHGKGQUNtR4ihqIvcrtooDn/l8hbPQET5AT2q+sC9mwzEfF8SOjnQHm/d/gosX2SMtJEkQkUST+naaJQZVp6WyLAFynMxrQcmhmzVvZ4zuPj+LxtC8J71n5OmW/APKYqONZpAydCnWK4ch8TQmPZJCzd39PAXE/8mE5sSIEoixcsnHdpNG3G+EztFu/vkca3f6HkUPmkY6ubbtSs9UNB/gkv80cNET6zmNeLsWJdT/580QQcXVUifZlImFkkEKL0TWMBmQ7HNqZfvwQs+PTxg4sV6S/Xz+iobsyELaH+1FyciBn4aAfNh3StScyDgpbW1mOGbu0hdwFonsWHQ1NDRK2D3hSpbG2X0BUwFEhcdZyQtwikI1exgwXp+UZsPz7xlvuExoRSlXOAEk/BQ0+GSQLOvokUW4yYdUkSYmo/o9nK4FzqM3T6H7EmW6YT4dx8ytsGG4aSIJNKGQ9OI6j+9JYuG6Do1G5dJJReAAcuyFzWAaXPB4VY4x4JazSnu6shmKwrFRcaYlhner2gFn2GxW2CvfuHmZFHWrWdZhXT9mWkAux09CXtultmmkrIZCGFg3UZQa7iBulJ+Lr0sH0dARjY+0vxiikcdB1yYXNWhmC9k5jOSoAgNHA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(136003)(39860400002)(396003)(346002)(1800799009)(186009)(82310400011)(451199024)(46966006)(36840700001)(40470700004)(7696005)(6666004)(2616005)(1076003)(83380400001)(478600001)(26005)(426003)(16526019)(336012)(2906002)(110136005)(54906003)(8936002)(8676002)(70586007)(5660300002)(316002)(70206006)(4326008)(40460700003)(40480700001)(47076005)(36860700001)(86362001)(36756003)(41300700001)(82740400003)(81166007)(356005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 19:21:06.3056 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d45ce91b-4098-421e-eb86-08dbafd79579 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4892 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org Add support for CXL EINJ error types for CXL 1.1 hosts added in ACPI v6.5. Because these error types target memory-mapped CXL 1.1 compliant downstream ports and not physical (normal/persistent) memory, these error types are not currently allowed through the memory range validation done by the EINJ driver. The MMIO address of a CXL 1.1 downstream port can be found in the cxl_rcrb_addr file in the corresponding dport directory under /sys/bus/cxl/devices/portX. CXL 1.1 error types follow the same procedure as a memory error type, but with param1 set to the downstream port MMIO address. Example usage: $ cd /sys/kernel/debug/apei/einj $ cat available_error_type 0x00000008 Memory Correctable 0x00000010 Memory Uncorrectable non-fatal 0x00000020 Memory Uncorrectable fatal 0x00000040 PCI Express Correctable 0x00000080 PCI Express Uncorrectable non-fatal 0x00000100 PCI Express Uncorrectable fatal 0x00008000 CXL.mem Protocol Correctable 0x00020000 CXL.mem Protocol Uncorrectable fatal $ echo 0x8000 > error_type $ echo 0xfffffffffffff000 > param2 $ echo 0x3 > flags $ cat /sys/bus/cxl/devices/portX/dportY/cxl_rcrb_addr 0xb2f00000 $ echo 0xb2f00000 > param1 $ echo 1 > error_inject Signed-off-by: Ben Cheatham --- drivers/acpi/apei/Kconfig | 2 ++ drivers/acpi/apei/einj.c | 24 +++++++++++++++++++++++- drivers/cxl/core/port.c | 19 +++++++++++++++++++ drivers/cxl/cxl.h | 1 + include/linux/cxl.h | 18 ++++++++++++++++++ 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 include/linux/cxl.h diff --git a/drivers/acpi/apei/Kconfig b/drivers/acpi/apei/Kconfig index 6b18f8bc7be3..eb9cc7157342 100644 --- a/drivers/acpi/apei/Kconfig +++ b/drivers/acpi/apei/Kconfig @@ -55,6 +55,8 @@ config ACPI_APEI_MEMORY_FAILURE config ACPI_APEI_EINJ tristate "APEI Error INJection (EINJ)" depends on ACPI_APEI && DEBUG_FS + imply CXL_BUS + imply CXL_ACPI help EINJ provides a hardware error injection mechanism, it is mainly used for debugging and testing the other parts of diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c index 013eb621dc92..8000417a5f26 100644 --- a/drivers/acpi/apei/einj.c +++ b/drivers/acpi/apei/einj.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "apei-internal.h" @@ -36,6 +37,7 @@ #define MEM_ERROR_MASK (ACPI_EINJ_MEMORY_CORRECTABLE | \ ACPI_EINJ_MEMORY_UNCORRECTABLE | \ ACPI_EINJ_MEMORY_FATAL) +#define CXL_ERROR_MASK GENMASK(17, 12) /* * ACPI version 5 provides a SET_ERROR_TYPE_WITH_ADDRESS action. @@ -512,6 +514,22 @@ static int __einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, return rc; } +static int is_valid_cxl_addr(u64 addr) +{ + struct cxl_dport *dport; + + if (IS_REACHABLE(CONFIG_CXL_ACPI)) + dport = cxl_find_rch_dport_by_rcrb((resource_size_t) addr); + else + return 0; + + if (!IS_ERR_OR_NULL(dport)) + return 1; + + pr_info("Could not find dport with rcrb 0x%llx\n", addr); + return 0; +} + /* Inject the specified hardware error */ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, u64 param3, u64 param4) @@ -537,8 +555,11 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, if (type & ACPI5_VENDOR_BIT) { if (vendor_flags != SETWA_FLAGS_MEM) goto inject; - } else if (!(type & MEM_ERROR_MASK) && !(flags & SETWA_FLAGS_MEM)) + } else if (!(type & MEM_ERROR_MASK) && !(flags & SETWA_FLAGS_MEM)) { goto inject; + } else if (type & CXL_ERROR_MASK && is_valid_cxl_addr(param1)) { + goto inject; + } /* * Disallow crazy address masks that give BIOS leeway to pick @@ -807,3 +828,4 @@ module_exit(einj_exit); MODULE_AUTHOR("Huang Ying"); MODULE_DESCRIPTION("APEI Error INJection support"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(CXL); diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c index 001ab8742e21..f8f300496140 100644 --- a/drivers/cxl/core/port.c +++ b/drivers/cxl/core/port.c @@ -1122,6 +1122,25 @@ struct cxl_dport *devm_cxl_add_rch_dport(struct cxl_port *port, } EXPORT_SYMBOL_NS_GPL(devm_cxl_add_rch_dport, CXL); +#if IS_ENABLED(CONFIG_CXL_ACPI) +struct cxl_dport *cxl_find_rch_dport_by_rcrb(resource_size_t rcrb_base) +{ + struct cxl_dport *dport; + unsigned long index; + + if (!cxl_root) + return ERR_PTR(-ENODEV); + + xa_for_each(&cxl_root->dports, index, dport) + if ((dport->rch && dport->rcrb.base != CXL_RESOURCE_NONE) + && dport->rcrb.base == rcrb_base) + return dport; + + return NULL; +} +EXPORT_SYMBOL_NS_GPL(cxl_find_rch_dport_by_rcrb, CXL); +#endif + static int add_ep(struct cxl_ep *new) { struct cxl_port *port = new->dport->port; diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 4d5bce4bae7e..3e6779dbcd23 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -8,6 +8,7 @@ #include #include #include +#include #include /** diff --git a/include/linux/cxl.h b/include/linux/cxl.h new file mode 100644 index 000000000000..b57a4cc85005 --- /dev/null +++ b/include/linux/cxl.h @@ -0,0 +1,18 @@ +#ifndef _LINUX_CXL_H +#define _LINUX_CXL_H + +#include +#include + +struct cxl_dport; + +#if IS_ENABLED(CONFIG_CXL_ACPI) +struct cxl_dport *cxl_find_rch_dport_by_rcrb(resource_size_t rcrb_base); +#else +static inline struct cxl_dport *cxl_find_rch_dport_by_rcrb(resource_size_t rcrb_base) +{ + return NULL; +} +#endif + +#endif From patchwork Thu Sep 7 19:19:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Cheatham X-Patchwork-Id: 13376833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE216EC8754 for ; Thu, 7 Sep 2023 19:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232239AbjIGTV1 (ORCPT ); Thu, 7 Sep 2023 15:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjIGTVY (ORCPT ); Thu, 7 Sep 2023 15:21:24 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2060.outbound.protection.outlook.com [40.107.96.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6B4DB2; Thu, 7 Sep 2023 12:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mFmuySvtx4CWRzmCM5c7kEpg1cQ9wEpAsMtAySXXVB8BWirEnjEF773QYsqJJqVdd74D5qU5cpfh3dzB0mRqeKB86uo3pi/FZobAHi4dpjVYXeIX72qPRSYzWJcIY0Xym5rVEZiBfFjBs9jmvyjj8T4vvlXNoM0QDuWYgizEJ5kUiyE0LVB9ZUGo+stt8hGqeSLedTFM2X/leDw0tGWh+Ql8dzhr9zrxzMBnr+XVxhIS4LN+K1zJIJlSFBz8Y+DVZlV3T9nzxu8Y/rRMfFMvm2ckQEcNOYu/WpO5dwsoMbw/vnUxWYcknpJCQl6uFIdd0aBtuEmprEwIXsJJ0pauDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=JbKk1/q6uJY2Ni8c20DS7c9zdFz6tOATL3GvKDZU4Mk=; b=T7aQKP7LWBMqlpQfSO+kLRR+ujL1eh7bJxRXrVmkNL6goGRT8fp/yz+b3qRJBZgwFvSUSdyp93sCb8iyem+ToZ7ziLwf4yCCx3istyIxI2PkI60Xp1Oa/4wOOhESPJtu5W4r1HDyxM9+SIkrxBco4JPfQ/WfoWiuakeiNdJ8roZMnkXQFxkcfeQc4GzC8wvE7cO9HznUxerXm4YoR4Iv4ao0qZdIFKiWAOxOzbxizKjLU7OnYphqHoo9NnVMdLUSi8ECx5erramcU85t0U10vKpuaMPwOLyJOT2B4iRxfkaBEcoj3r5pxaXHepw66PJSl52A8c77Kn4Qu0zXdIkZdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JbKk1/q6uJY2Ni8c20DS7c9zdFz6tOATL3GvKDZU4Mk=; b=LCnUVvOdCXk2Yk7AEUI3RX67Myz9qyB+2qkwi+HEzpXrckRLxMHVSQwmd3QP0ISeekd/T/XvHZR5zIfXmpbNY1KzFNblB6cC3WBwRfGdpgweEJ20kvi/XOpR5Bfui3kLc/crdDm2yoh1Fh4N5p8josYxnNGMhuXYMPTzj2fGdOg= Received: from SN4PR0501CA0018.namprd05.prod.outlook.com (2603:10b6:803:40::31) by CY8PR12MB7195.namprd12.prod.outlook.com (2603:10b6:930:59::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.36; Thu, 7 Sep 2023 19:21:17 +0000 Received: from SN1PEPF0002636B.namprd02.prod.outlook.com (2603:10b6:803:40:cafe::95) by SN4PR0501CA0018.outlook.office365.com (2603:10b6:803:40::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.10 via Frontend Transport; Thu, 7 Sep 2023 19:21:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636B.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6768.25 via Frontend Transport; Thu, 7 Sep 2023 19:21:17 +0000 Received: from bcheatha-HP-EliteBook-845-G8-Notebook-PC.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 7 Sep 2023 14:21:16 -0500 From: Ben Cheatham To: , , , CC: , , Subject: [PATCH v4 3/3] ACPI, APEI, EINJ: Update EINJ documentation Date: Thu, 7 Sep 2023 14:19:56 -0500 Message-ID: <20230907191956.674833-4-Benjamin.Cheatham@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230907191956.674833-1-Benjamin.Cheatham@amd.com> References: <20230907191956.674833-1-Benjamin.Cheatham@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636B:EE_|CY8PR12MB7195:EE_ X-MS-Office365-Filtering-Correlation-Id: d942d87a-d100-4da2-b535-08dbafd79c16 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +VyCryCPirrgVzZctKLd8onlrTMf9Sp+61Jpf2wJs3HEAC/jpaaqJjZQmjcu7eazjnCStDzjz6AUOGb0tn1tjpE8MvH4C8qnySkARqReJY1e8V0tkB8jguECXBug4O8ReXoLGxd+j3DigYEseN+eRzboFIJ1jKZ0ufxmzMWv6yb3gCRUBl/9ZhBAJBoCGRkdIRbg22yG3Y4rflZYd9q5dnx68eAPnz0xNSxVS1MG7nJav8vVS7d6wSpTrFCte7ZoZwkT6SgUbkWah21FjppfbS3NUUm3ic+hzDWd20LVAGpaY0teQ1SX87gAVftpHZwJymVO5aDRAUg7d1oM0GyitGPnOMwQ94vLcDKHiOc3pQXm1/mP5b9UuziRtmNRu9BxXtJcSyOlbCy/xz9DzK1PYHPY5d9blnHsviuABpiy9i/dl4ZgFdJ9yOJGfz7OQJfIKryWDNsNiMbYVtTjnJxodh2mQaAut0cVuyaES/66kdSkDO9/GT4PvRbAMWqFxlOHJkrbr+BShhY6R8HiPYiZgJAQO5nddtTJ2clb2zO4EOdDqJwXAoAOlxI0+hNF0QAX+nYRMxJPxaIegNPEHN3H1/P5tmXK+ASyJKLAlUCtpM0JmweP55Y+9CIYxYyJ5PsUfbSowbaqUYGSLtyoSvlmNdMt4mMwr1KIi05sW/Zc7A+ZLs907yXcFIs13xasp3toxn5XJ9QLgaV2iqkXiS5OBR/dEyT7axjdxvx5n7F0dea81CxItys7xoqL2rijyFyaRt7DD8TLKfctEV8Rk3MATA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(136003)(346002)(396003)(376002)(82310400011)(1800799009)(451199024)(186009)(40470700004)(36840700001)(46966006)(81166007)(82740400003)(356005)(40480700001)(36756003)(86362001)(40460700003)(478600001)(110136005)(2906002)(6666004)(70586007)(70206006)(4326008)(7696005)(8936002)(8676002)(5660300002)(54906003)(316002)(41300700001)(15650500001)(47076005)(36860700001)(83380400001)(336012)(426003)(2616005)(16526019)(26005)(1076003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 19:21:17.3995 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d942d87a-d100-4da2-b535-08dbafd79c16 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7195 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org Update EINJ documentation to include CXL errors in available_error_types table and usage of the types. Also fix a formatting error in the param4 file description that caused the description to be on the same line as the bullet point. Signed-off-by: Ben Cheatham Reviewed-by: Jonathan Cameron --- .../firmware-guide/acpi/apei/einj.rst | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Documentation/firmware-guide/acpi/apei/einj.rst b/Documentation/firmware-guide/acpi/apei/einj.rst index d6b61d22f525..c6f28118c48b 100644 --- a/Documentation/firmware-guide/acpi/apei/einj.rst +++ b/Documentation/firmware-guide/acpi/apei/einj.rst @@ -32,6 +32,9 @@ configuration:: CONFIG_ACPI_APEI CONFIG_ACPI_APEI_EINJ +To use CXL error types ``CONFIG_CXL_ACPI`` needs to be set to the same +value as ``CONFIG_ACPI_APEI_EINJ`` (either "y" or "m"). + The EINJ user interface is in /apei/einj. The following files belong to it: @@ -40,9 +43,9 @@ The following files belong to it: This file shows which error types are supported: - ================ =================================== + ================ ========================================= Error Type Value Error Description - ================ =================================== + ================ ========================================= 0x00000001 Processor Correctable 0x00000002 Processor Uncorrectable non-fatal 0x00000004 Processor Uncorrectable fatal @@ -55,7 +58,13 @@ The following files belong to it: 0x00000200 Platform Correctable 0x00000400 Platform Uncorrectable non-fatal 0x00000800 Platform Uncorrectable fatal - ================ =================================== + 0x00001000 CXL.cache Protocol Correctable + 0x00002000 CXL.cache Protocol Uncorrectable non-fatal + 0x00004000 CXL.cache Protocol Uncorrectable fatal + 0x00008000 CXL.mem Protocol Correctable + 0x00010000 CXL.mem Protocol Uncorrectable non-fatal + 0x00020000 CXL.mem Protocol Uncorrectable fatal + ================ ========================================= The format of the file contents are as above, except present are only the available error types. @@ -106,6 +115,7 @@ The following files belong to it: Used when the 0x1 bit is set in "flags" to specify the APIC id - param4 + Used when the 0x4 bit is set in "flags" to specify target PCIe device - notrigger @@ -159,6 +169,13 @@ and param2 (1 = PROCESSOR, 2 = MEMORY, 4 = PCI). See your BIOS vendor documentation for details (and expect changes to this API if vendors creativity in using this feature expands beyond our expectations). +CXL error types are supported from ACPI 6.5 onwards. To use these error +types you need the MMIO address of a CXL 1.1 downstream port. You can +find the address of dportY in /sys/bus/cxl/devices/portX/dportY/cxl_rcrb_addr +(it's possible that the dport is under the CXL root, in that case the +path would be /sys/us/cxl/devices/rootX/dportY/cxl_rcrb_addr). +From there, write the address to param1 and continue as you would for a +memory error type. An error injection example:: @@ -201,4 +218,4 @@ The following sequence can be used: 7) Read from the virtual address. This will trigger the error For more information about EINJ, please refer to ACPI specification -version 4.0, section 17.5 and ACPI 5.0, section 18.6. +version 4.0, section 17.5 and ACPI 6.5, section 18.6.