Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2322077lqt; Mon, 22 Apr 2024 07:46:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVgAvgEd14Rasw2iiXOepaFdg4Ay2BqLJcw5qmMrSZ7GeeIW8GyM0xCxEdIcSih2fgO7Up2GhkWoO5G1gk2hkJgeIsJuQmYzvy4jaKU9Q== X-Google-Smtp-Source: AGHT+IEQn7qHy3F3c1LvgZ/dFmBnfbWAixi9rxKa7R7NvwWSdybD3nph0jF1poRmbO8ZlbVkoap5 X-Received: by 2002:a17:90a:c7cd:b0:29c:7566:a1d6 with SMTP id gf13-20020a17090ac7cd00b0029c7566a1d6mr8460802pjb.25.1713797163581; Mon, 22 Apr 2024 07:46:03 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id mw11-20020a17090b4d0b00b002ab30c3b40dsi9996901pjb.134.2024.04.22.07.46.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 07:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=NZocnFUL; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-153552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153552-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E5A0DB210C6 for ; Mon, 22 Apr 2024 14:34:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D727152194; Mon, 22 Apr 2024 14:34:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="NZocnFUL" Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2075.outbound.protection.outlook.com [40.107.244.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DDA61514EC; Mon, 22 Apr 2024 14:34:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.75 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713796452; cv=fail; b=Ebr7MDKvC9iu85IgZ2K2NoSXLi94N2wMgt5hEFbl25rPHwOyrNy0K1orNT+YO0BUrkrfUbYjT1SZ00uRWoC83fByq/cEKk8BKL4HaGb0oY+zlofUs7ax58eeK1XbQoe6dnsIsg3+qnMMYPwHTRflhaahh4rd4MNAhShsaDhJzTE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713796452; c=relaxed/simple; bh=1HKJYIJRKRXWEnyBrtaL0U6Y98yumc3x8uEaxQ5Mr5A=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=BmuFXQDt4tNF/p0NIvIZgbZwmdroKFPHbrsHcFPlICNjMKytu8XxXk5Hq8pz5UarPi0PW6rm1oSiO0fRmFRgm9CzQWP0EQwN9Hv7ceCSlO6FHXZNNcSDycMUGn9V/D/Ksja+KJkKXaPIa9qDGI10Ks8x3xTynGuhH4EZePRzYVI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=NZocnFUL; arc=fail smtp.client-ip=40.107.244.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGlDWhWn2wnnuA8fS29FVRT5mNjNchVSp0l4JLzGDkX5r5WQphKhGMcdvHGwiWnTlsz07WT/t0O7yVZmKNatRfG3JL42iEJ9hYXJNyjVGFN25tgyH0nbYxxGxN7hJgkcNt7gnOXWA70cQ0eEiC4G2H1FmRWjGEJsc5K4/PwO1JW7psGvg9AZCBZl+XNnGzGCqLoewUV7isMXV/hwGbb86EP3xzxLhZx/1oJwILlPptA5orv6bWsnzUXsiIwR1Cf05ffhyE317UrrcVvnCCfakrrzND2ZjvMssyTAcTu+V8jPMTAxm7FLBQbUfXfEAAF5qPx+d1lNT9GSo6eAbp4JrQ== 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=W2bEJapc1BqzGI5bsSqfBI8qODv/FhGdwKZvNo6fqCo=; b=SviSd3M9ha6X6HbqZt3QUMRFLfA7IvaYTN+GAknd+znk/cBvj+7wcKodlEjUmjcXCsLfHd7bSDFf/68kXsytvDQASN9zqyN1TIMHM/lwTR3EaAzH5ffsbtNYgKHmpocgzzZu+N5RpUpkyv6NKR51OBNBUxucleReiPRACK8wqztSXBXGx4l+UuoNF2T17ocTkwQ5UPt0NuRrPLUb4XoPliVs0Ttl/cHcxGAiapMGNwA7s4NRbT3VH/EMX0qhoHd3jzkpOQtjWhXpf8ztDWWmDGV27sAsEJTn97N0rJL1HdqCGbqqSATHPqSif+IdbfoPOU/s7Df9xFtMEB35z84VbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=W2bEJapc1BqzGI5bsSqfBI8qODv/FhGdwKZvNo6fqCo=; b=NZocnFULHPMrareH2it7Wv7ib4o9mdcE1ArmJ8RHWqMgkxzBPoZ/X9gCqz9ydP17F6wg5JbGLWvW01GVhCl+M/FINE3DucVkwChEO4kUqRtuqqPFVkBT8G8gDtXxDuWom7ncBrX+A51M3HVpyQjIh/3L6VscMEZ/Wf3ikrBvAnA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS0PR12MB6390.namprd12.prod.outlook.com (2603:10b6:8:ce::7) by DM4PR12MB7743.namprd12.prod.outlook.com (2603:10b6:8:101::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Mon, 22 Apr 2024 14:34:07 +0000 Received: from DS0PR12MB6390.namprd12.prod.outlook.com ([fe80::38ec:7496:1a35:599f]) by DS0PR12MB6390.namprd12.prod.outlook.com ([fe80::38ec:7496:1a35:599f%4]) with mapi id 15.20.7472.044; Mon, 22 Apr 2024 14:34:07 +0000 Message-ID: <84eb39a1-60dd-40cb-8c7c-dfd9a988732d@amd.com> Date: Mon, 22 Apr 2024 09:34:05 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 1/6] PCI/RCEC: Introduce pcie_walk_rcec_all() Content-Language: en-US To: Dan Williams , Li Ming , rrichter@amd.com Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240313083602.239201-1-ming4.li@intel.com> <20240313083602.239201-2-ming4.li@intel.com> <661e00eb808e4_4d56129429@dwillia2-mobl3.amr.corp.intel.com.notmuch> From: Terry Bowman In-Reply-To: <661e00eb808e4_4d56129429@dwillia2-mobl3.amr.corp.intel.com.notmuch> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA1P222CA0113.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c5::27) To DS0PR12MB6390.namprd12.prod.outlook.com (2603:10b6:8:ce::7) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR12MB6390:EE_|DM4PR12MB7743:EE_ X-MS-Office365-Filtering-Correlation-Id: df033453-a221-4fe2-3f18-08dc62d94433 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TkpjR3RDSzdyRHBZUlQyaG9tSm42TW5pWkdpSGdCOW1IYm1PRFlzK3Q1NkJ1?= =?utf-8?B?elQ5a3ZXNTY5V29vRldLVW43TU0wSTh6ZHBlY3ZOQys0WVZSai9tR2M5N2ZV?= =?utf-8?B?M2VQMTU2clN4Y2h6VnlVdFg5RTdDTzZvdUEvaGFIdXZGRGxIdzNKTU1ucVRn?= =?utf-8?B?ZkVNaE4rbnlFUXprZldnYzIzalpiOXVhN29CRGNnbHJTMS91dWI2YTE1L1hF?= =?utf-8?B?N2lFL2x1ZmxBUEZ4YUZuMG53OUV6RFJnY245NjJ3dmk2MkgzQjNJa21QT1hU?= =?utf-8?B?b2dxVTBtcXdsaVFBOHdiUlE2SmoyLy9Bb3ZGUHFvQzl6TFBWM3FONlRveW95?= =?utf-8?B?emlSdkUwSmpCYVBvK0lWeFRlamhQaDVPeDAyWmQ2bW5UYldLeklqaUxDWWli?= =?ut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HFTeEkzcEZxYll5Wk8z?= =?utf-8?B?M0xjNVhPMTk5cUlaVzZkQWpjM0VpVHdzeDRKdVh4STY4d1NTNldmYWVleWRx?= =?utf-8?B?RkFDL01ncjFIVWQveTlROFFvWHhmcHNwdGxocXpMRjlxYXg4V0phR2duRklE?= =?utf-8?B?UXZVbTIwczY2NDN3TStNVWZxTnk0cnVicjY2ZUhZeVlNVUE2R1Y4dHFIN05z?= =?utf-8?B?TnJZUEdiemp5TUNpVDNjUTY1Q1NWUEdxc2ZGaEQrdzBBWkdHU1VEbWdYMmpS?= =?utf-8?B?TWd4WjVSMFVyOHl1d3BZMmFBRERxU0FZK0NERXk4Yi9oSlNsWk0yaUpaWU1t?= =?utf-8?B?WVZwTnpSSlBzOHJtMUplaE5rSVRIWkxVdnZ6eWdoWGVGQTFTWWpoa2V1N21q?= =?utf-8?B?NVNKdVlWZVdzMXo2VGdNUXQzU29nUld2em85MGVqRFNyNHBDTDc4ejdnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB6390.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YWZNakpyamxEOTZwc2gxRTMydEhmTHVJaUJDWk9XdzhvK0YvZUw0TVFIK0Fu?= =?utf-8?B?ekc1S1Y2Z2haWHlUb2VXM3QzUlBMYUlCVkpDR3FHaXVoYnN6akdZZzRVdFAy?= =?utf-8?B?Sys2WmtkT0RySWhmSEQ3ckgzMTkzb1hlNWdZSzRXSEhiUkoreGhwN0xpNHUv?= =?utf-8?B?dFFydXNPdjkxZi9mTGlKT0tLT1pSYVdMMUYzV0VPRVI4T25wSDB1TnYzYVMw?= =?utf-8?B?STZFWE0rbzJyUUhVUGdpaUdVR0U2RUdscG1M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8?B?ZGNCOUllckJyd1h3aVJqYzI1YjhBbjIxMUxncWFhaEc2aytKODhxWEdweTU3?= =?utf-8?Q?4LNYHPMETr5TjFC62K8QORqP5?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: df033453-a221-4fe2-3f18-08dc62d94433 X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB6390.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2024 14:34:07.2630 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eAmIQ4WtgXjV+JS04h+Km4Ottsz6qEz/FedPQu4D8bubNwERv3WptgUF4d3+eIOGCxih8iTyTxmZ8LDeF26xUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7743 Hi Dan, On 4/15/24 23:39, Dan Williams wrote: > Terry Bowman wrote: >> Hi Li, >> >> I added comments below. >> >> On 3/13/24 03:35, Li Ming wrote: >>> PCIe RCEC core only provides pcie_walk_rcec() to walk all RCiEP devices >>> associating with RCEC, but CXL subsystem needs a helper function which >>> can walk all devices in RCEC associated bus range other than RCiEPs for >>> below RAS error case. >>> >>> CXL r3.1 section 12.2.2 mentions that the CXL.cachemem protocol errors >>> detected by a CXL root port could be logged in RCEC AER Extended >>> Capability. The recommendation solution from CXL r3.1 section 9.18.1.5 >>> is: >>> >>> "Probe all CXL Downstream Ports and determine whether they have >>> logged an error in the CXL.io or CXL.cachemem status registers." >>> >>> The new helper function called pcie_walk_rcec_all(), CXL RAS error >>> handler can use it to locate all CXL root ports or CXL devices in RCEC >>> associated bus range. >> >> The RCEC-root port relation you mention is new to me. Typically, not in >> all cases, RCH-RCD has a RCEC. And a VH mode system has a root port >> instead. The RCH RCEC and VH root port are both bound to the PCIeport >> bus driver that supports handling and logging AER. This allows the PCIe >> port bus driver to handle AER in a RCEC and root port AER using the same >> procedure and accesses to the AER capability registers. >> >> This is oversimplified but are you looking to handle root port AER error >> in the RCEC from the below diagram? >> >> RCEC <--> CXL root port (bridge) <--> Endpoint >> >>> >>> Signed-off-by: Li Ming >>> --- >>> drivers/pci/pci.h | 6 ++++++ >>> drivers/pci/pcie/rcec.c | 44 +++++++++++++++++++++++++++++++++++++++-- >>> 2 files changed, 48 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h >>> index 5ecbcf041179..a068f2d7dd28 100644 >>> --- a/drivers/pci/pci.h >>> +++ b/drivers/pci/pci.h >>> @@ -444,6 +444,9 @@ void pcie_link_rcec(struct pci_dev *rcec); >>> void pcie_walk_rcec(struct pci_dev *rcec, >>> int (*cb)(struct pci_dev *, void *), >>> void *userdata); >>> +void pcie_walk_rcec_all(struct pci_dev *rcec, >>> + int (*cb)(struct pci_dev *, void *), >>> + void *userdata); >>> #else >>> static inline void pci_rcec_init(struct pci_dev *dev) { } >>> static inline void pci_rcec_exit(struct pci_dev *dev) { } >>> @@ -451,6 +454,9 @@ static inline void pcie_link_rcec(struct pci_dev *rcec) { } >>> static inline void pcie_walk_rcec(struct pci_dev *rcec, >>> int (*cb)(struct pci_dev *, void *), >>> void *userdata) { } >>> +static inline void pcie_walk_rcec_all(struct pci_dev *rcec, >>> + int (*cb)(struct pci_dev *, void *), >>> + void *userdata) { } >>> #endif >>> >>> #ifdef CONFIG_PCI_ATS >>> diff --git a/drivers/pci/pcie/rcec.c b/drivers/pci/pcie/rcec.c >>> index d0bcd141ac9c..189de280660c 100644 >>> --- a/drivers/pci/pcie/rcec.c >>> +++ b/drivers/pci/pcie/rcec.c >>> @@ -65,6 +65,15 @@ static int walk_rcec_helper(struct pci_dev *dev, void *data) >>> return 0; >>> } >>> >>> +static int walk_rcec_all_helper(struct pci_dev *dev, void *data) >>> +{ >>> + struct walk_rcec_data *rcec_data = data; >>> + >>> + rcec_data->user_callback(dev, rcec_data->user_data); >>> + >>> + return 0; >>> +} >>> + >>> static void walk_rcec(int (*cb)(struct pci_dev *dev, void *data), >>> void *userdata) >>> { >>> @@ -83,7 +92,7 @@ static void walk_rcec(int (*cb)(struct pci_dev *dev, void *data), >>> nextbusn = rcec->rcec_ea->nextbusn; >>> lastbusn = rcec->rcec_ea->lastbusn; >>> >>> - /* All RCiEP devices are on the same bus as the RCEC */ >>> + /* All devices are on the same bus as the RCEC */ >> >> RCiEPs are not guaranteed to be on same bus as RCEC. Details for associated >> next and last busses: >> >> "This register does not indicate association between an Event Collector and >> any Function on the same Bus Number as the Event Collector itself, however >> it is permitted for the Association Bus Range to include the Bus Number of >> the Root Complex Event Collector."[1] >> >> [1] PCI Spec 6.0 - RCEC Associated Bus Numbers Register 9Ofset 08h) > > Hi Terry, > > This patchset is responding to the implications of the implementation > note in 9.18.1.5 RCEC Downstream Port Association Structure (RDPAS). > That says that CXL.io and CXL.cachemem errors in Root Ports may indeed > be signaled to an RCEC. Do you expect that implementation note to cause > any issues on platforms that do not follow that CXL spec behavior? > > My expectation is that it may just cause extra polling for errors, but > not cause any harm. AMD platforms in RCH/RCD mode consume protocol errors in the RCEC's AER driver. AMD platforms in VH mode consume protocol errors (including root port errors) in the root port's AER driver. The exception is the VH mode host with CXL1.1 endpoint and RCH downstream errors. CXL1.1 endpoint and RCH downstream errors in a VH host are consumed in the RCEC. I don't believe these patchset changes would affect this behavior. But, I will need to test to confirm. Regards, Terry