Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp159452rdf; Thu, 2 Nov 2023 17:32:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbcLOdanYhWUa0MzbMouRwBSaAHULtVHZjp7AMufb2Ya6F55eqbcdaZILtXjij9fBsSyq9 X-Received: by 2002:a05:6870:8c2e:b0:1e9:beae:9481 with SMTP id ec46-20020a0568708c2e00b001e9beae9481mr14688347oab.23.1698971534675; Thu, 02 Nov 2023 17:32:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698971534; cv=pass; d=google.com; s=arc-20160816; b=HNGeo885rKxt5MCn0O7RV8yEr+HiyzCMs9zr+dUJ3WV1V6OOwn9kFttEXZqIaeyiF/ s0ovcRUHFD0TbShancktNZ7TDQm9eksbKapWPkJf9uGWAdoldS34lp2EKaUchKx6ttVX Bv30pd288vCmZBYgR6a9aPYPwoSAPpBact7lCR68l93x9tIQr38pDf/Mw0IzguOpB7j9 m/twFWZRS8rBvUgxkwRGNh5EvxvGxRBr6sVB2H70v/Iay8w3jR3fzwaAOVaLPXmvn9fF TWwtMa/aCgCrRpqQIaHZ6YtIVpCq4TiCX0XEiJ90zj+fleNeUk4Mi3Hr+258YlF+4hzP rVGQ== 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=SuVcA1YJY1vy1frPyG2g6Inh2HhEI+1q6IVFdC+UzlU=; fh=fWt/zGjJO/n8C0YJ3vckuVv984tumMTidTHMaWHUNJM=; b=MXjh/7VjJplKpMMWMLmu8stV3R+N52V/0gkdAuxskvjhlXT/+dHjO4oaAokGe39QPb iIszw2tRqyaymgRegtiIYnxZ0w0xkjvgQbL0AapryUIN+OgeJXJX4nJ8FXejzD9FswNs SwQowErLaTFm3qDH6t+wHU8O6sMXs4JoSemjoq/9EhJotcTV15AV4hE3Baxh6L06Ul8H OYPPeWiG0gwh4nfoSUoiU83FS6v49b2gZDPNGbvIU7hGuWbZuSHt9q2do52jz0ohl/t4 ndr3bblEdGldq/7jLSOQ3GAV1/xmmYE0wFMFdw19Sk8gW89tVEMMgeoQBi/IRO8tF0oJ UAVw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=kFTAHs2j; 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.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id a20-20020a656054000000b005bd3056e1fcsi521526pgp.466.2023.11.02.17.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 17:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=kFTAHs2j; 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.38 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 fry.vger.email (Postfix) with ESMTP id B059682DEE5B; Thu, 2 Nov 2023 17:31:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbjKCAbG (ORCPT + 99 others); Thu, 2 Nov 2023 20:31:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjKCAbD (ORCPT ); Thu, 2 Nov 2023 20:31:03 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2068.outbound.protection.outlook.com [40.107.237.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E9B136; Thu, 2 Nov 2023 17:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h0WGxkquoEtI5o9shoauW8/0Ugd3YqMUQaSSKj392+eoGrOL05VkAYA9ibSHwI6vwxh5cS11201hImI1IwzF9uDLkE41pCnRQVkO6mWS2piXv4VJyYIio/8xxtf1vWOQ/UlQHiWnN23pRjEKG0HKE+Wu1rOJlAarLQevsSLEBOIlSLPAGYpDqv1T0GGlTWy6NnsuipmkPNay/pFh7xGZJqmMSEqQdv7sk8WVthT7Ok4mFFiFbzx8mKvr//+/v0D9+nGfD5nF15oTYGQC4XhH8UKQUzT4DINeLWBXoIP5jfG7ZFYYy539hlMnC5s1qhOFcilBChAhP8V1SvA5pBF9HQ== 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=SuVcA1YJY1vy1frPyG2g6Inh2HhEI+1q6IVFdC+UzlU=; b=Pl2TiHt+dn32CADZRvIX5J5Ir4MCSZfpbkXCBoP0LK3zlQjcVrXD1G5AoXWKV5eAhpRwnTYRhKSwkBq/APXD2t2Y6N8D8l8j6a6jHW/SBZli0qslm2pYKQFKE4jRj3kMcuwU0NujF0HHlOuU+jSErSTtGhFjaZIgT+M9/89yNldwHgd0OlsZjmFlm9ybvsTc139rxN0K+bUzI2ZKKd4KEA6cbm9SLfQQWAI+PO+3mk+mTEAOf8ZyqMh6Mh6nmN/jKfd/vNra9dXph9cxki4MtmIJKezbg/KSbAyAVt4vwPOFZh5oSl92f4b+RNtLGU9/FLk665ALriyMwT3UY9px3g== 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=SuVcA1YJY1vy1frPyG2g6Inh2HhEI+1q6IVFdC+UzlU=; b=kFTAHs2jxgNqncQ8z+/saAedxozcj5q2PqAe//wPPsj6shA9vccjJ3IpsqjBcgO61Oc6xV0w9SfKpzGR+XM/un6uk6d7ZpCwHrcntzDu9ALx0ifs1PHBT5mLT0/NBimMZNTnZbMpTqobX3F2cEpNaOtWwEiQX0pDTzlY2De4vrc= 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 PH0PR12MB7010.namprd12.prod.outlook.com (2603:10b6:510:21c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Fri, 3 Nov 2023 00:30:55 +0000 Received: from BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::ea10:2f7:ef14:9c]) by BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::ea10:2f7:ef14:9c%4]) with mapi id 15.20.6933.026; Fri, 3 Nov 2023 00:30:54 +0000 Message-ID: Date: Thu, 2 Nov 2023 17:30:51 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH RFC v3 5/6] firmware/efi: Process CXL Component Events Content-Language: en-US To: Ira Weiny , Dan Williams , Jonathan Cameron Cc: Yazen Ghannam , Davidlohr Bueso , Dave Jiang , Alison Schofield , Vishal Verma , Ard Biesheuvel , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org References: <20230601-cxl-cper-v3-0-0189d61f7956@intel.com> <20230601-cxl-cper-v3-5-0189d61f7956@intel.com> From: Smita Koralahalli In-Reply-To: <20230601-cxl-cper-v3-5-0189d61f7956@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR21CA0016.namprd21.prod.outlook.com (2603:10b6:a03:114::26) To BYAPR12MB2869.namprd12.prod.outlook.com (2603:10b6:a03:132::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR12MB2869:EE_|PH0PR12MB7010:EE_ X-MS-Office365-Filtering-Correlation-Id: 652ec45d-1115-4d21-1f20-08dbdc042337 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W+Z4qjK8u2G8zk/rbjA+k2zFzjb20ic4yJvk1eCsLj6rciRBkJlupLYA7DMMTBMDXDI2sOMl7PTspTTgTTeEqKai5419x1TR1U6SQs7Gwb/DJfQeJFgtUjYw9fKnkghJ+8fDf5FDIlwhz42dricqG1inGiXH6E7I0a5YUToER7g+7+dYgkMx7xU9LxBUzZTH61w773FqwXTHTgzy21IsYRcuHPj6/tim+4UOWeWh0ijjwscY92qR5NfRq9+HfUiWXy2H9xUAHMuVrqLwy3zN+CHqGZDluFq9neft+jdthMk1XeR5gZ+5/ZFrQ/pMMjV1ftmpaejuzNcwRud2UIGnlIcycuKnJt6vw4OGKOnMrLp6nhNKb8lSD6yuYQiveUg1N4fnKoXrdC4wX6p3eiBuhjcPJYP192bDWcafW7BeXwZ4rf9q4xsCZ1oUqVYsTzTb4IJgIu5PEWaclm4WA2RV8wh9Fx+nsYwkt+JekXX3LpLwEcBziFiFPEb8WcNdLqXg6J4sNTNtVCaesgkelPjQhdJuzVGfyCiyXU6KOqwRVYWQIk1qLPnYqqQzm1b35TbIuq6WIPKKxtUm3IYnG8i4+zbYWvLzWG6PztmOow9A6gNyMbhmWNx/JkKMPH45x2yUM7o5EDxZ/iia9O95AY/itg== 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)(136003)(376002)(396003)(366004)(39860400002)(346002)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(4326008)(8676002)(8936002)(41300700001)(7416002)(36756003)(2906002)(5660300002)(26005)(2616005)(83380400001)(53546011)(6666004)(6506007)(6512007)(31686004)(31696002)(38100700002)(86362001)(6486002)(54906003)(66946007)(66556008)(66476007)(110136005)(478600001)(316002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MWYrYU9NWi9Oc2xhWHlZZ1hwRzJWNkplcjNqdmg4K2hMVzQvRHR1cnIzVFd6?= =?utf-8?B?dmMyZExvNlRMUElUbGxZdG5uUU1EMU5ibDUxazZMazVJQ0g4MzRLWmVCYlJJ?= =?utf-8?B?Z0R0OGM0MlNtOTlMWlZQUjFValdYcEhKTGo2QTZiNlQwV2VFWmVqbC94TkNm?= =?utf-8?B?YkRrUVdkRWJTank5YS9OcGZGbGl5aWlNbytkNFVTZGtrWjErQURBWmY3bkJP?= =?utf-8?B?RFl2VHhvUVd0TE0rcGxRcUJ2NTJEM2xlQTBqL21yc2hEQWV1eFU0eStoUGlw?= =?utf-8?B?a2FweWJuTTAvZ3gwS2RJYUJCdFR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8?Q?UeTaDoQVCOcdhccLE9bttIL/0?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 652ec45d-1115-4d21-1f20-08dbdc042337 X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 00:30:53.4121 (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: mPhZjM3+qDDFHdEIMdeFUfBtCj1FfuEeKMTX4wSsW76NpVJC013FTYC/Z0+JO2CDbsSnjsiCJhj0BDqUcYsdOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7010 X-Spam-Status: No, score=-5.0 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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Thu, 02 Nov 2023 17:31:25 -0700 (PDT) On 11/1/2023 2:11 PM, Ira Weiny wrote: [snip] > diff --git a/include/linux/cxl-event.h b/include/linux/cxl-event.h > index 6b689e1efc78..2bdadde80f1a 100644 > --- a/include/linux/cxl-event.h > +++ b/include/linux/cxl-event.h > @@ -108,4 +108,53 @@ struct cxl_event_record_raw { > union cxl_event event; > } __packed; > > +enum cxl_event_type { > + CXL_CPER_EVENT_GEN_MEDIA, > + CXL_CPER_EVENT_DRAM, > + CXL_CPER_EVENT_MEM_MODULE, > +}; > + > +#define CPER_CXL_DEVICE_ID_VALID BIT(0) > +#define CPER_CXL_DEVICE_SN_VALID BIT(1) > +#define CPER_CXL_COMP_EVENT_LOG_VALID BIT(2) > +struct cper_cxl_event_rec { > + struct { > + u32 length; > + u64 validation_bits; > + struct cper_cxl_event_devid { > + u16 vendor_id; > + u16 device_id; > + u8 func_num; > + u8 device_num; > + u8 bus_num; > + u16 segment_num; > + u16 slot_num; /* bits 2:0 reserved */ > + u8 reserved; > + } device_id; > + struct cper_cxl_event_sn { > + u32 lower_dw; > + u32 upper_dw; > + } dev_serial_num; > + } hdr; > + > + union cxl_event event; > +}; Do we need pragma pack or similar for alignment here? Thanks, Smita > + > +struct cxl_cper_notifier_data { > + enum cxl_event_type event_type; > + struct cper_cxl_event_rec *rec; > +}; > + > +#ifdef CONFIG_UEFI_CPER > +int register_cxl_cper_notifier(struct notifier_block *nb); > +void unregister_cxl_cper_notifier(struct notifier_block *nb); > +#else > +static inline int register_cxl_cper_notifier(struct notifier_block *nb) > +{ > + return 0; > +} > + > +static inline void unregister_cxl_cper_notifier(struct notifier_block *nb) { } > +#endif > + > #endif /* _LINUX_CXL_EVENT_H */ >