Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5461835rdb; Wed, 13 Dec 2023 09:14:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAHlmk0qRdkrkqP6KbzkSYEACcKzys9dVpir8G/VvXy5N/YnkQ6ft8lCIleDvsSdamnfC+ X-Received: by 2002:a05:6a21:609:b0:18c:770:4578 with SMTP id ll9-20020a056a21060900b0018c07704578mr9408437pzb.30.1702487672553; Wed, 13 Dec 2023 09:14:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702487672; cv=none; d=google.com; s=arc-20160816; b=l5/zV8oJZLyOMxxfJJzq39Ef4HeOqPgupwvYME6FQGFU5zP8JEAqhYLLiPdHh/iXQB 8u89zxo/gp23R9A3L2xPBVBG6bGlkCd2Hy0WcfhnT150W5AO4j/uDqNuHyEZMngB/+2d YmNPbbb6v5zd1/8zRzuphwcOCLG8VKu1tlAN2zIzz6hy7rQBDpzzjrRZr4sPgLgbyGSj u/YRukv85MpuxcTWJsShMQlGKLGAphcKOr5GwAID96YR/Xd27qPHw2Uwgdg2ErgdUU2+ o0PBv1xfwa/PEWJutJXqbtC/g4miAoMQH/mPVle2GyQXQJzYtFvhgSuUBcmpEfg9xLA1 TWsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=9zho22HcO0JgQhqF8CTllmUoApfPxtA1UBbNPjrBjnE=; fh=Opv570sc8zaZcx63Px34kQV/zkvDE/GNsm1LPZ68Sdw=; b=WeIdMa9D1xE4+gkdBXPIMbQDY6WbFp7kTcMvT5w823A+ClkhdFgIDT9mOJnF8ffFqb Pl9sjcWrK7Zw8l6DaGYqy4xpOyoFmCxCx628+CdEMOgsRK3QNxK6VOKCn/WCxQ9MdmYd scu761UMwZGoRwS9VKlVPwdpqGj6Q0Eho4u7D0W+l5S5qvUdoA19pSQ4gYEtjorZS4Hi te6ge3NQJUSr0G0NYwFukZ+NMZteE/bpig3o3i4+nqkBuekQavLOyfHlOwqR3k+bZjWS PrxSABjbuPnthNpawKRx3yDCCMhU5iXlQkVKNTJXDW/VBjL39+NE784fvz3LznoMWXpx 0CfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id bw40-20020a056a0204a800b005c672f5f9fdsi9855792pgb.710.2023.12.13.09.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:14:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 1BF64826E8CD; Wed, 13 Dec 2023 09:14:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379000AbjLMROB (ORCPT + 99 others); Wed, 13 Dec 2023 12:14:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379271AbjLMRNv (ORCPT ); Wed, 13 Dec 2023 12:13:51 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76DEB116; Wed, 13 Dec 2023 09:13:55 -0800 (PST) Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Sr28Y3J8Sz67QZL; Thu, 14 Dec 2023 01:11:57 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 6A82F140595; Thu, 14 Dec 2023 01:13:53 +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; Wed, 13 Dec 2023 17:13:52 +0000 Date: Wed, 13 Dec 2023 17:13:51 +0000 From: Jonathan Cameron To: Ira Weiny CC: Smita Koralahalli , Dan Williams , Shiju Jose , "Yazen Ghannam" , Davidlohr Bueso , "Dave Jiang" , Alison Schofield , Vishal Verma , "Ard Biesheuvel" , , , Subject: Re: [PATCH RFC v4 5/6] firmware/efi: Process CXL Component Events Message-ID: <20231213171351.00004579@Huawei.com> In-Reply-To: <65674a71ef4d0_a1b25294e4@iweiny-mobl.notmuch> References: <20230601-cxl-cper-v4-0-47bb901f135e@intel.com> <20230601-cxl-cper-v4-5-47bb901f135e@intel.com> <7ec6d2af-c860-9b05-7eaf-c82f50f8e66e@amd.com> <65674a71ef4d0_a1b25294e4@iweiny-mobl.notmuch> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 09:14:30 -0800 (PST) On Wed, 29 Nov 2023 06:28:01 -0800 Ira Weiny wrote: > Smita Koralahalli wrote: > > Hi Ira, > > > > I tested this out. Just one correction below to make it work. > > > > [snip] > > > > + > > > +#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; > > > +} __packed; > > > > __packed attribute just for cper_cxl_event_rec still fails to properly > > align structure elements. Looks like, __packed attribute is needed for > > all structs (cper_cxl_event_devid and cper_cxl_event_sn) inside > > cper_cxl_event_rec. > > > > Seems easier to use global pragma instead.. I could test and obtain the > > output as expected using pragma.. > > I did not know that was acceptable in the kernel but I see you used it in > cper_cxl.h before... > > Ok I'll do that and spin again. > > Thanks so much for testing this! I was out last week and still don't have > a test environment. Easy to hack into QEMU :) Hmm. I have a CCIX patch set from years ago somewhere that does similar. Would be easy to repurposed. Looks like I never published them (just told people to ask if they wanted them :( ). Anyhow, if useful I can dig them out. > > Ira