Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2961216rwi; Tue, 11 Oct 2022 16:19:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vPjzANAjxm+XGL++qwuZvPLeT3rTgSwN0p3NEC+7phX0As7tI18KQcVUutLDtRsIc3niG X-Received: by 2002:a05:6a00:88f:b0:530:dec:81fd with SMTP id q15-20020a056a00088f00b005300dec81fdmr27725340pfj.64.1665530365503; Tue, 11 Oct 2022 16:19:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665530365; cv=pass; d=google.com; s=arc-20160816; b=FffDCYedBCHj7raXSgyi93e3qCuP6kkvEJUrWhqO6TjeYo1RJRxi0yya4pczGFTJLy gC1QgNnS1WnQ3d8gaVrFaEx+l5B3I30w1v+iwrgGlfe2ifS3V2ztLlQk1QqR6XJR92NE cgE8NVmiAyKbhCgDvRe/nCarktL3hOHcFl6iHbl0WNPi5EqofkbP+Lmij7GD5NYE4Bva iq5ndwDwyo89qt2Tc/1EgWz6hs9cEklF2NtUP4g5jNAwdL0BJjS8e/iRZrC2Kaoc1/gb KNHEbffVPeTMqtlaGb1gpQGcCFcgT7tclWz6uuqI/0fcxHlelua1DnzzMO19bvWDNa4m N+RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=uOcIWQIz4uoiY3JEzHyJAs8FJVmdg3ZTcgPUITVL/uU=; b=szxbU57hRV5vWAdpF2HCeYORC94hp4xTSyRs9vLX/9ISyXsBAC4XovWeV6tGjZETeT f+h3cIdNiqwQI+qFMtyjBjAvOXaleXxWADumpT3hsf5EHuEdItQtiJj81IqsU4oM2Do2 SKtPW8BQG+faHRwFXzTZEIBCHOgglFTlpHWyfg+1GqgxT5W6OgO2mFCgTypChvBFCzSe 4JDo6rRWEkPPcDnua5M8LXU7KXhMc6GeneVbp1cbWzx9xE+BmWuG85ltJXJ+DP+6hcBq Vaql8J21iHc3MJaLhAs4AjHhcfpoqz9G7IQ3BYWgvIFt+g5VCkRynMU/GBykaunT4mVn hTeQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=hdqcfTR9; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a170903024500b0017cf07295c2si18843477plh.484.2022.10.11.16.19.14; Tue, 11 Oct 2022 16:19:25 -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; dkim=pass header.i=@amd.com header.s=selector1 header.b=hdqcfTR9; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229475AbiJKXSA (ORCPT + 99 others); Tue, 11 Oct 2022 19:18:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiJKXR6 (ORCPT ); Tue, 11 Oct 2022 19:17:58 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9F0225D0; Tue, 11 Oct 2022 16:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GPChHDLEadM/jqWLxSkiLHdJDEhjnBHIAFuHnf2Wi+9KNRZR42KUKPuLOO0xJLt15bFFojEGb+WblbWx9s1VexcuQgrzAmo9vSWDDV6To0XKUv88ByW+PUtJsDYnSYc2sypXDVMjGWOe+6TqX/YKcIi5ynAGEY6Q/8Z8qS6Gm2uMqppRBY16mCpSDKK0M+080Dmi6mJ9v/LZrEmjDqa2xAVIUZFJk7Il5ZnOWCIjJkyz/REYeZlL/ZB4CQTmGuQfsR4/vkAvcEktaUvhdgVBlPckUiIfqmb+CWVaqtQG6R8DyAkdP/mi5HZXH5A0qzKvDEtIStihhXFmzNgZm08RpA== 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=uOcIWQIz4uoiY3JEzHyJAs8FJVmdg3ZTcgPUITVL/uU=; b=lSvzCB5chdXs37UPD6wvixIVawBpShOrwDnntXlbyRk9GdiKv6An8xW6RokhU0t2Y3fuUy8BI8G/PNDmYUIpdsLeeKkGU8EmiwOMJDBFooFHhMmvEY7yPT/uEB6LpHRjRoyNQZ71xIMjw1+e6jpo3qVyG/aHxrLekIKWs9EOeVkxDbe1H/lPBHSRfJxtE+JUCUkEEBD5h/XmtMqw+HAs3OvvJsf3E/60/7TgXBOU9Q0t6e5RFfdnb62yQSna+vq+uGoMaaqrZ4cKQ4pbC1pt6mHJEuw6mqQW4f+iEaMKXc4yocpwvk7YS22dGXJtqIKlUlo+NNoUe//bn4roGTtaAw== 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=uOcIWQIz4uoiY3JEzHyJAs8FJVmdg3ZTcgPUITVL/uU=; b=hdqcfTR9QTwyve4rcNkQyZ+4GRqr3op8l/eAkuI9tk/Na+wXBLu3UfIepXZd+L+kZKLN7uAQDWa9mzh9AaID8x/66VrsEQmXNzLRA1IbXNipmC2Ea2vv9GEW7N7p4xRFjivZVADtXJipMJSPHxv7U+QNLVxSDhjoLo4G4z9hYuQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BYAPR12MB2869.namprd12.prod.outlook.com (2603:10b6:a03:132::30) by CH2PR12MB4119.namprd12.prod.outlook.com (2603:10b6:610:aa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.21; Tue, 11 Oct 2022 23:17:54 +0000 Received: from BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::2af1:f102:b108:13a1]) by BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::2af1:f102:b108:13a1%3]) with mapi id 15.20.5709.021; Tue, 11 Oct 2022 23:17:54 +0000 Message-ID: Date: Tue, 11 Oct 2022 16:17:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 2/2] efi/cper, cxl: Decode CXL Error Log Content-Language: en-US To: Jonathan Cameron Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Alison Schofield , Vishal Verma , Ira Weiny , Ben Widawsky , Dan Williams , Robert Richter , Yazen Ghannam , Terry Bowman References: <20221007211714.71129-1-Smita.KoralahalliChannabasappa@amd.com> <20221007211714.71129-3-Smita.KoralahalliChannabasappa@amd.com> <20221010153415.00004bc0@huawei.com> From: Smita Koralahalli In-Reply-To: <20221010153415.00004bc0@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR05CA0002.namprd05.prod.outlook.com (2603:10b6:a03:33b::7) To BYAPR12MB2869.namprd12.prod.outlook.com (2603:10b6:a03:132::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR12MB2869:EE_|CH2PR12MB4119:EE_ X-MS-Office365-Filtering-Correlation-Id: 19b6411a-eaad-4fa8-81c3-08daabded37d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: arEiMyMDE/SzA28G07187ySdCyePXlos48J5NaXGaeU+njX6tCXEOsWE9e5uv4y+cCyJ9cjXJm/VQa151XH0uhVC29dHTguSjHEWqKIYiQ4+UlctSh/Fo54oIZ02O75u70+DR2hLcysCZy6n0w92lehh1bQiC+mZ+viiTRMl5aQnAAIAjmckYuhpmo/jw1zk02dEmJGD/QxfsVnRJHxWUfpVfdwFU0D7LFPCG/3ygKFUnGE8iJUuJL40yFRLbhcMDsgZa6PkKABeM81vaJ98L6FPB3YVmvhvS0TaM0fGjswsQtG3NMS+dJZ02rCr8ZYoVONRV1gysin63jRtoV/+80yR63nc78RRp4w4GD04Gv4yXxM6lQP+U2V6i2ScpRqL9iILicdrXtXRLjU8ogFWMGyv6kwAjG+lZxzidKD+/di/3Wm1QHp71+caH/9EMGcD0fM6DFQSqpfNGkHOb314oJ8hZU/VMmYeleJq21RUCnJndXaGjAcEmNPZyI7WCe9x2A+DZ7bpUNGjyYzTlAQCHRpd0l1U2LjGM5JqAJsWlIA5EYGHLj1zib4hNITp65iypBIDCrLJMTTIHga8r7recOiGnLMvdW6M43fQ4j0F9pJDlZV8FFULMPUu6NHbqscuD8SFsdb1FrsprwzQNr5JQTzZxr4Z9/QZTBawCV7czZFgU2tCM6awUchiZYywMWHA2CNGPj50DTMxE25aCb05vRU8KLYrypQWqvw1y6UoY4bxf2Gg+J0xouAgZK5mhtMIW+vesC9aIV2WZdX+kj3J7TOxOWHnsLQ8yYGYd6sS5I4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB2869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(376002)(136003)(39860400002)(366004)(396003)(451199015)(36756003)(38100700002)(6916009)(316002)(54906003)(8676002)(6486002)(86362001)(2906002)(8936002)(5660300002)(66556008)(66476007)(4326008)(66946007)(41300700001)(6506007)(53546011)(478600001)(31696002)(2616005)(186003)(26005)(6512007)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VE9DVEFNWFlmZG9jY04wNjBsMTNRSjlnY2diOGJNbytlZldsV1Bla3kzZlpi?= =?utf-8?B?YjNZamI2RjFQWmd0R1QrdWlyL1VGSFBZbEJMR1lyblgvN0s5MGl2cnN4TXlY?= =?utf-8?B?SHpMVHVaOE1EZVNaOVQ1TUlrckxzM1FMMVlpOVpzSFpZOVYxZitacmVPeGVN?= =?utf-8?B?TzBnOHdLL2p4aUNTVTcwcTRNZzdYVitSNUVZWTFObGU5bWMvdFRSQ3RNNFdX?= =?utf-8?B?cUxMYWVvakdsVkR1NnhvT3FnNDFYRGFVbWhIMTU2ZmJ3bnl2NUJDN3ZPMS94?= =?utf-8?B?MkwwUXZNa01EWVBwU3BMY0JsUlFBUTkxa0tLRExNU203aHgvR1JqVS8ra2M5?= =?utf-8?B?VnFTYUZGYWczb1FZK21PS2lja3N3Ti82QnN3ZnNmVVpIYS84eG53T0FwOVF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3-08daabded37d X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2022 23:17:54.7216 (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: Ajj81sm8lMRt0GkK6D5sSuhJ7oOaRMhWQbE6t2W3OldRk+MkQm/MLBfvvt4qiSzvQeO4A0ujVFpAuDwF33RD7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4119 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 10/10/2022 7:34 AM, Jonathan Cameron wrote: > On Fri, 7 Oct 2022 21:17:14 +0000 > Smita Koralahalli wrote: > > >> + >> + if (prot_err->valid_bits & PROT_ERR_VALID_ERROR_LOG) { >> + size_t size = sizeof(*prot_err) + prot_err->dvsec_len; >> + struct ras_capability_regs *cxl_ras; >> + >> + pr_info("%s Error log length: 0x%04x\n", pfx, prot_err->err_len); >> + >> + pr_info("%s CXL Error Log:\n", pfx); >> + cxl_ras = (struct ras_capability_regs *)((long)prot_err + size); >> + pr_info("%s cxl_ras_uncor_status: 0x%08x, cxl_ras_uncor_mask: 0x%08x\n", >> + pfx, cxl_ras->uncor_status, cxl_ras->uncor_mask); > Is it worth splitting these up, so that we get a human readable line with the > individual fields broken out? Will do. > >> + pr_info("%s cxl_ras_uncor_severity: 0x%08x\n", pfx, >> + cxl_ras->uncor_severity); >> + pr_info("%s cxl_ras_cor_status: 0x%08x, cxl_ras_cor_mask: 0x%08x\n", >> + pfx, cxl_ras->cor_status, cxl_ras->cor_mask); > Not outputting the cap_control register? Some of that might be useful. Will add. > >> + pr_info("%s Header Log Registers:\n", pfx); >> + print_hex_dump(pfx, "", DUMP_PREFIX_OFFSET, 16, 4, cxl_ras->header_log, >> + sizeof(cxl_ras->header_log), 0); >> + } >> } >> diff --git a/include/linux/cxl_err.h b/include/linux/cxl_err.h >> new file mode 100644 >> index 000000000000..c89dbb6c286f >> --- /dev/null >> +++ b/include/linux/cxl_err.h >> @@ -0,0 +1,21 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only */ >> +/* >> + * Copyright (C) 2022 Advanced Micro Devices, Inc. >> + * >> + * Author: Smita Koralahalli >> + */ >> + >> +#ifndef LINUX_CXL_ERR_H >> +#define LINUX_CXL_ERR_H >> + >> +struct ras_capability_regs { > CXL r3.0 Spec reference plus prefix it with cxl_ Okay. > > Agreed with your comment at the top. Some discussion needed on where to > put this - or whether to delay figuring that out until a later stage. Yes, more discussion needed here though! Thanks, Smita > >> + u32 uncor_status; >> + u32 uncor_mask; >> + u32 uncor_severity; >> + u32 cor_status; >> + u32 cor_mask; >> + u32 cap_control; >> + u32 header_log[16]; >> +}; >> + >> +#endif //__CXL_ERR_