Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp612658rdb; Thu, 19 Oct 2023 13:53:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0W8DtpG9Vn5WLRrFV2DLe1DyosttG1JwxohpZG8ov1fC6iWf2l4QuQ8io4xIjYwirhL+r X-Received: by 2002:a05:6358:1802:b0:166:e2f7:2e43 with SMTP id u2-20020a056358180200b00166e2f72e43mr3079977rwm.10.1697748780630; Thu, 19 Oct 2023 13:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697748780; cv=none; d=google.com; s=arc-20160816; b=S037VUJI9/56Ny3qmoucm7CxWYa+V73md5Pn/5pO/HCqZZZfy9gF2V/5eydLoe0SBv j1xDS53zTou75uMkblVBfkqpOVH1XXQNsGHrkynkbS+Cc+2o8E+AtB/fTbLk4ZzDyKHr xn8knrFgv1f9HjEGJzoqrCZu6WTv8JwszWKbbmBig+CDrDB+tgqjCw2J3cL2ZPD3Q1Qj TuNT3Yq9CC/u6+9c/ZOYVVOF1ORNljMIX0YZFuyAAEJ6fGiEOlqw0P2M16llYC4h2qrk LOga2iMFlLTsZUosLx3mSRXhPGkMcBknabj96eM8BM6SRPL2fcK4c75rUHb0tRdl789J 47wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=iUr+QTgPhTiJX8zHUYt4sLk0CBZgEhZtchbjM7kUUZA=; fh=bkw5Ib3QTWVzzw8ja1hIXQ+3HMZFnlfn6d5XNQFcLBA=; b=hmB+CmCK6DgjUVWBuGThm2oFgi0wvKubyPoBmfTLBEfq88jtQ8SegCGTkFq8/1L5G1 4xtEwAeK1VbMB+ZJbpbk/0a9+sZgGYjH+rVYehXIJHbfinMut3f+4bTLfvhXBd3A3KnT G4vl9poxbi7EYY++x0+l6vdYMdPpE7Zu2e/0cCcYjeRb9frySMUJrn1QxoPHiIj4nwwC 1/+RjcXaNpg5U0VVWGmUHTEojbW2oIJ1UWwNL14kSwC124DGGSx2h+kdD44iRztnwqwv FShbTmMz3MzIMHO3uC8CdjbZyBYzAxfrmGbD9/x3CX4ZzM7BlLYEITd3yDbP9LP+cHQJ ng6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Q/VUvGCP"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id j9-20020a056a00174900b00690cc6f7598si462562pfc.247.2023.10.19.13.53.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 13:53:00 -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=@kernel.org header.s=k20201202 header.b="Q/VUvGCP"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 391BC81BDA6A; Thu, 19 Oct 2023 13:52:58 -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 S232856AbjJSUww (ORCPT + 99 others); Thu, 19 Oct 2023 16:52:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbjJSUwv (ORCPT ); Thu, 19 Oct 2023 16:52:51 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA12A113; Thu, 19 Oct 2023 13:52:49 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CC3CC433C9; Thu, 19 Oct 2023 20:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697748769; bh=3dzWUTFAxmU3wipGFobehTK7P0p+nDlBGaKxyhwIuDs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Q/VUvGCPD+aQ6/tm3hG0GsY1Wb4EyUW3sIPOHEyFhKSir6VgPDFZ2LYB60y+uYptJ PstLQ95C5kTtBd5omwncwSgHvwGBv1MhyUD7uEHyNh1acEgSjbenB/sUo6frnQbE3F T/dTLZcrnByOzjg/YJ3YBKC6G6aF+td+nXVqf8nj98yM+kCTiBCwqLA9uEYCuFO8C5 VSHcEYoqE0WzAqcKCjUyo+SqBd1U003F6r8/6hjaJ4AamYyCAIb79kF1r1JmE6/x5r sQraZdU6+3TVWPrUOzkD89mUoyMI0Aqm9F+BTNF+n/uLrw6fWHrLoxW7qPzYrLP0OO cO0E+BfJD9TYQ== Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2b9338e4695so1254721fa.2; Thu, 19 Oct 2023 13:52:49 -0700 (PDT) X-Gm-Message-State: AOJu0YymY03qzHDIDNY+TooA7Tk081N1TSRjV93nSwmnGYRA7z8I/Di8 6x6v/Rh7sIJwE117MiH4kBCrn+zPVXNshblVkeo= X-Received: by 2002:a2e:bc12:0:b0:2c5:8b1:7561 with SMTP id b18-20020a2ebc12000000b002c508b17561mr87872ljf.10.1697748767605; Thu, 19 Oct 2023 13:52:47 -0700 (PDT) MIME-Version: 1.0 References: <20231012230301.58500-1-Smita.KoralahalliChannabasappa@amd.com> <20231012230301.58500-2-Smita.KoralahalliChannabasappa@amd.com> <65288e68de994_2347eb294c2@iweiny-mobl.notmuch> <65302871abbc6_725832944e@dwillia2-xfh.jf.intel.com.notmuch> In-Reply-To: <65302871abbc6_725832944e@dwillia2-xfh.jf.intel.com.notmuch> From: Ard Biesheuvel Date: Thu, 19 Oct 2023 22:52:35 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] efi/cper, cxl: Decode CXL Component Events General Media Event Record To: Dan Williams Cc: Smita Koralahalli , Ira Weiny , linux-efi@vger.kernel.org, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Alison Schofield , Vishal Verma , Jonathan Cameron , Yazen Ghannam Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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]); Thu, 19 Oct 2023 13:52:58 -0700 (PDT) On Wed, 18 Oct 2023 at 20:48, Dan Williams wrote: > > Ard Biesheuvel wrote: > > On Tue, 17 Oct 2023 at 22:52, Smita Koralahalli > > wrote: > > > > > > 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 > > > > Once you've compared notes, can you please let me know how to proceed? > > I will not consider Ira's patches or yours for merging before that. > > Ard, I have a higher-level question. If these CPER records get routed to > the CXL subsystem to be emitted by code that is shared with the > native-driver record-retrieval mechanism, is there still motivation to > parse and emit them to the kernel log in the EFI code? > > The difference with these CXL memory error records vs other records like > CPER_SEC_PLATFORM_MEM is that the record contains device-local addresses > that need translation to be of use to other system-software and that > translation needs topology information that the CXL subsystem has > enumerated. > > So, my proposal is that the final form of this enabling would emit the > record for CXL to consume, but otherwise not emit it via printk(). Yes, that makes sense. If CXL is needed to make sense of this information, no point in printing the raw data.