Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp799220rwd; Thu, 1 Jun 2023 06:47:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6lhAmplEtwDeuAwFpXXEDQRfscoTK4X8qJ0uS3lULBvZW1KiAnHV7XdD3laXBHzLcR6gLM X-Received: by 2002:a05:6a20:9f04:b0:10c:9efb:e04c with SMTP id mk4-20020a056a209f0400b0010c9efbe04cmr6300848pzb.61.1685627224331; Thu, 01 Jun 2023 06:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685627224; cv=none; d=google.com; s=arc-20160816; b=MaR9885g0hs8XA5x8KZNOfLvL2+mOVWN5w9gK6w/FUeCXY+wAi1V+l/Cb9VBxvOe+t DYmEjqc/lXDpVqYp2e0Qz8U7lFLC5WvqJ6IXAZO5Ljab2OB5SX1fGc2wS9eouPbHAZP7 K5rrx4Ep72O7pl8GLI4bQfN12+i76DS49telN5wms3Cg6A6Lf3nEY+15EQMWLsOwPiSI trBURYmZjhzMgH++cXaqHIQkYCk2tBzmTr8cB9Ld1LYT/Y51/r4A6Uc7TE6NpVwqhpey 4Y/oEM4NgJf9nz2dKs/k7nTZxR+NLIl23PBU4HEVckYGpjlg8VLoPUPjjINzss2ziNOe CMgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=puyDF6GghZmarjSkUGAgV6U2qq/2NndNN58sfGSYzmM=; b=laQV866nwMa0K5QgNFZ661Xp1JibnrEIMid/4BCVOdkifJLvPfc9X6GW5e7H3Ae+DB Zd6aTxDhTRrvOrZva8nX4CwsPlmRgq5ZI6/PPeNLwoXNFwQpG2k8ZOtPbgTixrdwVEUD JRlnw/8mUgB7B5epnj6mGEBPlj/vtuAxlr65NSMTm95nd/oXHDzbklb8+sZe1nexDcDI hPvhZljbKG53LXqRoQ9+Ely6vfkzQMXsWhFZLwDYt40JGzIgp7AJTySf0Tq90dPhWQoF 9dn2odCW5ebcilx1rVmimLn7nfQ7965c113vtHsaRqKrwlQWSdvtRrL+B3E0DV9OJfs7 XpbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020aa799c6000000b0062565210347si4145058pfi.275.2023.06.01.06.46.52; Thu, 01 Jun 2023 06:47:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233130AbjFANi4 (ORCPT + 99 others); Thu, 1 Jun 2023 09:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232329AbjFANiy (ORCPT ); Thu, 1 Jun 2023 09:38:54 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4C60107; Thu, 1 Jun 2023 06:38:50 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4QX6cc1HPkz67FSP; Thu, 1 Jun 2023 21:37:04 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 1 Jun 2023 14:38:48 +0100 Date: Thu, 1 Jun 2023 14:38:47 +0100 From: Jonathan Cameron To: Terry Bowman CC: , , , , , , , , , Subject: Re: [PATCH v4 17/23] cxl/pci: Add RCH downstream port AER register discovery Message-ID: <20230601143847.000058ff@Huawei.com> In-Reply-To: <20230523232214.55282-18-terry.bowman@amd.com> References: <20230523232214.55282-1-terry.bowman@amd.com> <20230523232214.55282-18-terry.bowman@amd.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500003.china.huawei.com (7.191.162.67) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 May 2023 18:22:08 -0500 Terry Bowman wrote: > Restricted CXL host (RCH) downstream port AER information is not currently > logged while in the error state. One problem preventing the error logging > is the AER and RAS registers are not accessible. The CXL driver requires > changes to find RCH downstream port AER and RAS registers for purpose of > error logging. > > RCH downstream ports are not enumerated during a PCI bus scan and are > instead discovered using system firmware, ACPI in this case.[1] The > downstream port is implemented as a Root Complex Register Block (RCRB). > The RCRB is a 4k memory block containing PCIe registers based on the PCIe > root port.[2] The RCRB includes AER extended capability registers used for > reporting errors. Note, the RCH's AER Capability is located in the RCRB > memory space instead of PCI configuration space, thus its register access > is different. Existing kernel PCIe AER functions can not be used to manage > the downstream port AER capabilities and RAS registers because the port was > not enumerated during PCI scan and the registers are not PCI config > accessible. > > Discover RCH downstream port AER extended capability registers. Use MMIO > accesses to search for extended AER capability in RCRB register space. > > [1] CXL 3.0 Spec, 9.11.2 - System Firmware View of CXL 1.1 Hierarchy > [2] CXL 3.0 Spec, 8.2.1.1 - RCH Downstream Port RCRB > > Co-developed-by: Robert Richter > Signed-off-by: Robert Richter > Signed-off-by: Terry Bowman Seems reasonable. Reviewed-by: Jonathan Cameron