Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3406987rdg; Tue, 17 Oct 2023 13:52:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZx284sItq47n9CyZ1qbEsxuEpMZ0FpTKRyA9yAUJ1lJLJNjSonGdzOhHOLkmOyG4APgQt X-Received: by 2002:a05:6870:1652:b0:1ea:647f:a9b6 with SMTP id c18-20020a056870165200b001ea647fa9b6mr3997683oae.44.1697575944628; Tue, 17 Oct 2023 13:52:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697575944; cv=pass; d=google.com; s=arc-20160816; b=nrqIBpxke/gXGkLhLL0KIRSa//mzmvBO5HqLp7iLgFakJKdPQWFlt7ecwueJi/5rGX 4unajdooyub/QPZSOUZltcABMxP1q+5olr6Fw+nvNK1r1P4MlKcZ92M7AQTOswLPQufA IGWsshXF33t9JoBNWx7+a2sKU+alQQ3jg9aIPCjYEmdn2AztPlQIoV5ockFW6VPbDG62 NSCxX5s2vithpSOwDb0A1UXyaM2PUBkTroC5dEV2yWKADEO5fnl0sed59b24+Qvo2LwP ZBiJaTVx31EuYe3D1ZKKVPw5H5Cag6pJMeg6sTgrswUDO/CQGCItlf3Sn/rwkFbbqxLq ZH9A== 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=5+JKv8wkTkywh1EqGktzRWycl54Dsby44cKzFDsbn28=; fh=GPxZayfDq7wAlqWo13lAuCMc889yOqCiwtHeHXdfYpU=; b=o3P23rg09KUSvbc/mnH85txJ0YhRIhz04t/q0EqhIccdX/Ypq2s8DiKmWz3Ff679AD Uguvn+E9f44I1Nm2jCyPaQUFBpn/f2DqbbgnthedjJTVp5S9OvVz3ueMyue4gJWtxq2B nlYxsl+eo7OiOcxjmSQyz6H9R3wB+hfGYRfYfZesjSjJqzmcLLJ3Rdx7lfw/br5+8PB3 qFxsSRPbkiqdgEkbOWm1zkQdjm4P5p9LUt/LX8IQW+4sYZQKioC/s9grnuDglciGDBbQ 8gymHdA42j4FgkOj05115euWJrFY4DK7XMvhFRElLhufpnOK9CcfPZ0c0xyIq8cJBRAM KQ4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=2xYHqA6N; 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 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id az1-20020a056a02004100b00577461296a9si621523pgb.338.2023.10.17.13.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 13:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=2xYHqA6N; 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 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 16380805B9F7; Tue, 17 Oct 2023 13:52:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343653AbjJQUwO (ORCPT + 99 others); Tue, 17 Oct 2023 16:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbjJQUwM (ORCPT ); Tue, 17 Oct 2023 16:52:12 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2070.outbound.protection.outlook.com [40.107.94.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1245892; Tue, 17 Oct 2023 13:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iBi9ppurGq0xnby7nYBk3evlWxgZuNQD/2DUnYDuhu9lphyN0cW9hxMRQZAwwiWuI5Lwfqq4Xhn87j7H3N6XGOFaa2B5Mt9PFiqDv9NCguQvn5nY/RdNLZarGAO9DHi8X/T2w+5qztjsJ0XUNT9MbxL5t2nNvBt0qyX/2kvYSU8wg7FAbNmIq9pTHDURhE847zzX2jo3MorX2bk+kxE/t7XvI8DJP1Irbytiywv9bUK3OhBfq7KOKedjAApBU5tTWFeeCgIo2vG0NXlMfaLnBu9bpWSZS3qysm2SCzIp1/OdqEmgLfQD+KTLABHY4KzXbnkW/5A0h3BdWLC6xZbKwA== 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=5+JKv8wkTkywh1EqGktzRWycl54Dsby44cKzFDsbn28=; b=j2fMiXjhA5f3QLaZQ9Cz+HAuPlyKoc/S5+qZFP5hoAyDNGPh3DDmlnh10rm8sohxk5/+SWaCRZpuUyie8YfUtZJ4SXZ+HATs3iSb69AfIwEoM27Wr7wMuhP6m65QNzJ4EQC9aBTAN4IVJT9dS52IUgu3rZSpnASa805QO3fkA7ILkIhB5bvM5ernbagdGU7vEJUrQXuYrOWv15AmQT0EUa445qbYiCEK9KIwTYqcdxr+ZztZjSWM2w5OmZ0GqDDck/ASNOiaXCsruoj4yYXN1WPGIwddcSbsUbIk9UDvPvj0yuZYlG+3O4zjkbSvJY1BkvecGVdSb4t8xZCE1OKW5Q== 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=5+JKv8wkTkywh1EqGktzRWycl54Dsby44cKzFDsbn28=; b=2xYHqA6NSusdDEqhyQi9r4kvfVeRWS/Vr0ZgjRsAVVzvPZ7eL+Agsr4CYtxptOJiiHuFgHr08I2IGrIhddWdv4AGkzZWTRMd9WGNBn0vuqot53xP4GrZpErSxlPfa89TD5Dw46v1IvAzpl5tCs/0Qbuet5GDWttWIsPLcebx5FY= 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 PH8PR12MB6844.namprd12.prod.outlook.com (2603:10b6:510:1cb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Tue, 17 Oct 2023 20:52:07 +0000 Received: from BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::2709:2c34:f842:ce33]) by BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::2709:2c34:f842:ce33%5]) with mapi id 15.20.6886.034; Tue, 17 Oct 2023 20:52:07 +0000 Message-ID: Date: Tue, 17 Oct 2023 13:52:05 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/3] efi/cper, cxl: Decode CXL Component Events General Media Event Record Content-Language: en-US To: Ira Weiny , linux-efi@vger.kernel.org, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , Alison Schofield , Vishal Verma , Dan Williams , Jonathan Cameron , Yazen Ghannam References: <20231012230301.58500-1-Smita.KoralahalliChannabasappa@amd.com> <20231012230301.58500-2-Smita.KoralahalliChannabasappa@amd.com> <65288e68de994_2347eb294c2@iweiny-mobl.notmuch> From: Smita Koralahalli In-Reply-To: <65288e68de994_2347eb294c2@iweiny-mobl.notmuch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR06CA0066.namprd06.prod.outlook.com (2603:10b6:a03:14b::43) To BYAPR12MB2869.namprd12.prod.outlook.com (2603:10b6:a03:132::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR12MB2869:EE_|PH8PR12MB6844:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e9447d1-eed9-4ad4-d8aa-08dbcf52ecec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LveNQt997b1E4+gos6yG1YJ4+ydTq0cuKEwS6ceS1aLg+syMrndfb/NaDHZ8md/MGkDhcMRRVt+pUa8PHvljPvuCs3punibvbqhq22itBZc+hYiRQbXYuaWapmbGqslQgLe/Qj22EbzMNX48JzfCmZUadh2Y8WHz6aUXfGModiIT60Ai1XkRWxB6GDx54CTL/oTR38i/1JiwDDRta+lgC6b45xrqoTMrNgCeYvRoE2TQ+9RxKn1M3Ve/XIbO+ZXZMjynRUI/nIyLJqSn+05/gSKDtHof8pKrlIqM7P0oHu7HYZBkct1ZP6P6AxFdAj9UN9f8luuxP7hdPb604pXlm7SwfUWthfpTN6YCWrBaqcUO/jKKZ3nIcsBXSYpHozHt/jXKdJEaNJw25IOUjkwrs5llrEhwa0etB0/HYV1VjHW6jke/HfiuVrrVOktpa8ocyAyVqvWxjnONbI9Id5okYYjGsgR5/AdzmyBSd4OdBJGLQQPiTZeP31ZJ2noUtATDR0sFcKmKO4bBQkrfmjSOp9ZcR5LZH1jEgaWoUYrIlasUx1bsTMV29E10XQMKtck6ZHFw35Jp5XGL7Dk/DyyZ8swLijkVPD98nERK2VcXF1VF2pJGuSzAnJA05X6pNtg11jIddBmY9nnHGyzr1gVuSw== 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:(13230031)(396003)(366004)(376002)(346002)(136003)(39860400002)(230922051799003)(1800799009)(64100799003)(186009)(451199024)(6486002)(53546011)(6506007)(38100700002)(478600001)(6512007)(31686004)(2616005)(26005)(5660300002)(41300700001)(8936002)(8676002)(4326008)(316002)(66476007)(54906003)(31696002)(66946007)(86362001)(2906002)(66556008)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V1RNM1RTZjRJRkpMOVNCdHhkY0xXclZUSWNjbVFLNnN2RkllSzRhS0tQQTAv?= =?utf-8?B?WVRFREhjNTBnWXdHclN0T0tyMDcvMHRRZVhuNjNEMDJyWkNpUG1wejlNUXpE?= =?utf-8?B?QlgzK0hoVC94bWlkS3NTUzYxTUw2WXJIdUh0V0dSZ200UkdEbXNGMkUxWEhu?= =?utf-8?B?VUNpa0xtV0lQSWdJcTBqVEV3MXNESXFhYmhTTzVvaWIyMWdObzBDQzJ3MHJF?= =?utf-8?B?RWkvckRWRkp6c2VibnZmelZKbjMwRVV1VitKODJ1V0pKTVkxdW54RHZoOER6?= =?utf-8?B?bUd5bWRoVlNUUWdRZHdjb2U5VzRvK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UcHdp?= =?utf-8?Q?ELmovn7g3YoqXqmX2n2mHnFaL?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e9447d1-eed9-4ad4-d8aa-08dbcf52ecec X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 20:52:07.3743 (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: 0j97y2RZECbUhbTIs0Vd+vLTadjkIK0DYEqgL+JstDI9KIGl+tzCzreVQE3FzEb5YW/B35mUMOQWG1aY4Nx6dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6844 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 17 Oct 2023 13:52:22 -0700 (PDT) Hi Ira, On 10/12/2023 5:25 PM, Ira Weiny wrote: > Smita Koralahalli wrote: >> Add support for decoding CXL Component Events General Media Event Record >> as defined in CXL rev 3.0 section 8.2.9.2.1.1. >> >> All the event records as defined in Event Record Identifier field of the >> Common Event Record Format in CXL rev 3.0 section 8.2.9.2.1 follow the >> CPER format for representing the hardware errors if reported by a >> platform. >> >> According to the CPER format, each event record including the General >> Media is logged as a CXL Component Event as defined in UEFI 2.10 >> Section N.2.14 and is identified by a UUID as defined by Event Record >> Identifier field in Common Event Record Format of CXL rev 3.0 section >> 8.2.9.2.1. CXL Component Event Log field in Component Events Section >> corresponds to the component/event specified by the section type UUID. >> >> Add support for decoding CXL Component Events as defined in UEFI 2.10 >> Section N.2.14 and decoding Common Event Record as defined in CXL rev 3.0 >> section 8.2.9.2.1. >> >> Signed-off-by: Smita Koralahalli > > [snip] > >> + >> +/* >> + * Compute Express Link Common Event Record >> + * CXL rev 3.0 section 8.2.9.2.1; Table 8-42 >> + */ >> +struct common_event_record { >> + u8 identifier[16]; > > I interpreted the CPER structure as not having this identifier here. > > From Section N.2.14: > > "For the CXL Component Event Log: Refer to the Common Event Record field > (Offset 16) of the Events Record Format for each CXL component." > > This implies that the data coming from the CPER record starts at length. Thanks for pointing this out. According to Spec, you are right. Our records did show up the identifier. Hence, I added that field. We should probably fix it from our end. Meanwhile, I'm taking a look at your patches. Thanks, Smita > > I'd be happy if my interpretation is wrong. But if I am wrong then there > is no reason to duplicate these structures which are already defined in > cxlmem.h > > I was plumbing up the cxl code to make a copy from length on and splice in > the uuid from the guid passed from the Section Type. > > Ira > >> + u8 length; >> + u8 flags[3]; >> + u16 handle; >> + u16 related_handle; >> + u64 timestamp; >> + u8 maint_op_class; >> + u8 reserved[15]; >> +}; >> + >> +/* >> + * CXL General Media Event Record - GMER >> + * CXL rev 3.0 section 8.2.9.2.1.1; Table 8-43 >> + */ >> +struct cper_sec_gen_media { >> + struct common_event_record record; >> + u64 dpa; >> + u8 descriptor; >> + u8 type; >> + u8 transaction_type; >> + u16 validity_flags; >> + u8 channel; >> + u8 rank; >> + u8 device[3]; >> + u8 comp_id[16]; >> + u8 reserved[46]; >> +}; >> + > > [snip]