Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp532815rdh; Tue, 19 Dec 2023 06:24:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1U6ax73azjxGMiNybvSVqO0oyEXx8ebP6PTae+J/tvk9sM3+1L2sKXpDnnwQxoxaKg/Ta X-Received: by 2002:a05:6102:fa4:b0:466:9ac5:d014 with SMTP id e36-20020a0561020fa400b004669ac5d014mr2709621vsv.2.1702995896364; Tue, 19 Dec 2023 06:24:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702995896; cv=none; d=google.com; s=arc-20160816; b=lZI2PDHs6/+PAxgjUeBictHYX73BTL6svNKkLfBf0pgvy2bd1jsC+oDnfdj4/+Sskj Zx9xlSw1oeot0GqpPMM3Q48ETY8DkT/OlQBtX4E8wI4Et5S/Uqr5VAywBCVAyaM9bqFf FMKhtrTSb1wZOqVJnl2Lc1+9wKSImqK1ufC50HmynfrtiTr5dl7HfnU1J09rsYhaTIlu Lv2WqnG38qakBSQs63dbPP17o6oUFDoyC5hrtITpw0191NtHw7AVTmSFRqRKTddcIUco bBHrKSHBc6UM0Cp+nUjJU3TpPafrMzUrT2z5hvvPBlOdrgYHz8rFMrAfVhRRSm6GkPYG wNKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=4pvdbgX9h9PFxku7MWtY7EGe7WSMX8ow0Nnh1yV8P3Q=; fh=D5/TWD7bHAbEssXha5Rv8uTbCnv9M/RndN6gMOTPHRM=; b=Lxoa0p8VjSxC1GcyptAwHhjQW5SiWNqBmzM8CyN7uAOEI4IbswUVpmYc9zVHCtucIJ vznONZHpO9AZCmkmV2QlkwuB852fmGPH9MFWLT4+nOanjBML8A6VRkbgXdv47KDuG62+ fe+p78urbJiaVtbk7qmzuqp2XbgE20cLDO30y/raFrR3VqLSWjhAM7Pz9PiXYeRQbRK1 m2ARLr7Fn5akzs4353Cr20PSeSxs9D9ZyocC30vIcsdoEmx4YZQSWDUrSXy07SEAUz9X zwM2MXWnGpvszJKVR+T21u7l5mA+ORp4hD/mnpsgi31VBW3iW/jjddNEZfnTTmGKG/J2 0gCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5350-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5350-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b14-20020a67e98e000000b004667d18885fsi1069938vso.358.2023.12.19.06.24.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 06:24:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5350-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5350-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5350-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 414C61C246C1 for ; Tue, 19 Dec 2023 14:24:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4071C1B29E; Tue, 19 Dec 2023 14:24:33 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 A23111C6AE; Tue, 19 Dec 2023 14:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Svf7g0bQGz6K62v; Tue, 19 Dec 2023 22:23:43 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id C19DF140DDB; Tue, 19 Dec 2023 22:24:06 +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.35; Tue, 19 Dec 2023 14:24:02 +0000 Date: Tue, 19 Dec 2023 14:24:01 +0000 From: Jonathan Cameron To: Ira Weiny CC: Dan Williams , Smita Koralahalli , Shiju Jose , Yazen Ghannam , "Davidlohr Bueso" , Dave Jiang , "Alison Schofield" , Vishal Verma , Ard Biesheuvel , , , Subject: Re: [PATCH v4 6/7] firmware/efi: Process CXL Component Events Message-ID: <20231219142401.00000c80@Huawei.com> In-Reply-To: <20231215-cxl-cper-v4-6-01b6dab44fcd@intel.com> References: <20231215-cxl-cper-v4-0-01b6dab44fcd@intel.com> <20231215-cxl-cper-v4-6-01b6dab44fcd@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To lhrpeml500005.china.huawei.com (7.191.163.240) On Fri, 15 Dec 2023 15:26:32 -0800 Ira Weiny wrote: > BIOS can configure memory devices as firmware first. This will send CXL > events to the firmware instead of the OS. The firmware can then send > these events to the OS via UEFI. > > UEFI v2.10 section N.2.14 defines a Common Platform Error Record (CPER) > format for CXL Component Events. The format is mostly the same as the > CXL Common Event Record Format. The difference is the use of a GUID in > the Section Type rather than a UUID as part of the event itself. > > Add EFI support to detect CXL CPER records and call a registered > notifier with the event. Enforce that only one notifier call can be > registered at any time. > > Cc: Ard Biesheuvel > Signed-off-by: Ira Weiny One trivial thing inline. + Agree that notifier naming is unwise given what that means elsewhere in the kernel. > diff --git a/drivers/firmware/efi/cper_cxl.h b/drivers/firmware/efi/cper_cxl.h > index 86bfcf7909ec..71f27b3e2810 100644 > --- a/drivers/firmware/efi/cper_cxl.h > +++ b/drivers/firmware/efi/cper_cxl.h > @@ -10,11 +10,38 @@ > #ifndef LINUX_CPER_CXL_H > #define LINUX_CPER_CXL_H > > +#include > + > /* CXL Protocol Error Section */ > #define CPER_SEC_CXL_PROT_ERR \ > GUID_INIT(0x80B9EFB4, 0x52B5, 0x4DE3, 0xA7, 0x77, 0x68, 0x78, \ > 0x4B, 0x77, 0x10, 0x48) > > +/* CXL Event record UUIDs are formated at GUIDs and reported in section type */ as GUIDs > +/* > + * General Media Event Record > + * CXL rev 3.0 Section 8.2.9.2.1.1; Table 8-43 > + */ > +#define CPER_SEC_CXL_GEN_MEDIA_GUID \ >