Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2520475rdb; Fri, 8 Dec 2023 10:22:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCi5tD1WpG5OEKPl/QBhOeBOeKzwboN1zYkIYeTyZ43nEQHCPGuNk/bIaPTm/zs9DwYNB5 X-Received: by 2002:a05:6a00:15cb:b0:6cd:ed99:efe0 with SMTP id o11-20020a056a0015cb00b006cded99efe0mr830351pfu.13.1702059735565; Fri, 08 Dec 2023 10:22:15 -0800 (PST) Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bq22-20020a056a000e1600b006cbd40b46basi1900124pfb.133.2023.12.08.10.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 10:22:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WFNNTLac; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id CB2A0831A4A4; Fri, 8 Dec 2023 10:22:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574486AbjLHSVy (ORCPT + 99 others); Fri, 8 Dec 2023 13:21:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbjLHSVw (ORCPT ); Fri, 8 Dec 2023 13:21:52 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B10F84; Fri, 8 Dec 2023 10:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702059718; x=1733595718; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=gHaNTRxbkt9HYWe+IwMxxExE511yTtACUQGXrxxip3g=; b=WFNNTLacX49Gvh1da/9e/l2OkpF1dYMTejiaZfU6zU9fJrnFI+o+vsdh De4Gb/+7+ZYT3mFF00gXun+pwOIf8t5G4Aw4tFvLhVa1AxjiFvGUWXRL2 94KRWstOZjXS6sN15ymZA3e9f1zefqofgR57TSBbgiiB0eCcso34q4C6f oWIVDGmAQBmlD4n+beHan3ew3J+/f/vkAbsoIAJd/4U8mKZZyFXNhhopJ y1exkL5D+8JLT99QMXafmAOXHkPgirlchpsPcj59eHz7JCNsiX0UbXZ2p g/IvAUTq82R+oCyEp7tgW8QrEq2tOecV3znTBRnXerZy77p26IE/2jV0M A==; X-IronPort-AV: E=McAfee;i="6600,9927,10918"; a="393310118" X-IronPort-AV: E=Sophos;i="6.04,261,1695711600"; d="scan'208";a="393310118" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2023 10:21:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10918"; a="838216152" X-IronPort-AV: E=Sophos;i="6.04,261,1695711600"; d="scan'208";a="838216152" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Dec 2023 10:21:57 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 8 Dec 2023 10:21:57 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 8 Dec 2023 10:21:57 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.41) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 8 Dec 2023 10:21:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QokNcSLJWiCfK61B1yFiqNQODEk8YomxnnbgTWJRUB6+37T9o/VR/RxW/ae7sJfOENG+CFjfEGKjZdC+YdZL1sAkPK6QOIs7GhNbTsDRuNm0RgfdY+cNUU3p2wZWlCjOmyZmC3wn2dLnSi87vwsgC/kn4EkaW5XvbH0NpCQyZIaW+S4tX5m1yr5bZIPDHAplPaQ4iERax9StLcmmk48c7rQA9fPPwILEuHSl/BeTGaFBU+sUMLH2kpO2FXjpGPU+5y+ObHJwCrdklL2Zwp5wz8VfuaE3LAVSFSGEuBtzK+qDn1fU5ro8Y6lqXuDIwh8nedPP/KcYbPdODEepk6zGPw== 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=J86H2WpVGzi2U1hs6/ZT5VeIvSciQAq4ii/gb0GLJng=; b=gwWaqQQMfT9VoMzUOj2Gw7tGVF3HGV85kL/7W4SwnZpYYrhK5VGdiyXZ/yjZeiQNW+KqL5QAP/vQbSsDxLeqpfOONJwR44ISr8YS7h+mwMUBoQiY+ZikC8m5zvPWh6/0ESJcdte7/5yBsZOP8PNuhm3442Jghd7UyrkJz15qHbVynsbdnpMJKmc9+W9ynlSyXjlxKUJPfd5WMnvwAHrUCn8Htd5Yn80WGuZfjCyJQxgm4eZRqQucGZy4QnaoqBFJkO1I4XZFiz1ygMquRXL/4DnSkQ9jNZoRIDzzbCaE0QfzfVdVmlXMU9af5P0qRFNRQCk/IYuqWXz9tDFghFsJ2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) by PH8PR11MB6610.namprd11.prod.outlook.com (2603:10b6:510:1cd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.29; Fri, 8 Dec 2023 18:21:53 +0000 Received: from SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::da91:dbe5:857c:fa9c]) by SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::da91:dbe5:857c:fa9c%4]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 18:21:53 +0000 Date: Fri, 8 Dec 2023 10:21:49 -0800 From: Ira Weiny To: Dan Williams , Ira Weiny , Jonathan Cameron , Smita Koralahalli , Shiju Jose CC: Yazen Ghannam , Davidlohr Bueso , Dave Jiang , Alison Schofield , Vishal Verma , "Ard Biesheuvel" , , , , Ira Weiny Subject: RE: [PATCH 1/6] cxl/trace: Pass uuid explicitly to event traces Message-ID: <65735ebd531b5_1e7d27294c7@iweiny-mobl.notmuch> References: <20230601-cxl-cper-v1-0-d19f1ac18ab6@intel.com> <20230601-cxl-cper-v1-1-d19f1ac18ab6@intel.com> <657263c249c4c_45e0129471@dwillia2-xfh.jf.intel.com.notmuch> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <657263c249c4c_45e0129471@dwillia2-xfh.jf.intel.com.notmuch> X-ClientProxiedBy: SJ0PR03CA0358.namprd03.prod.outlook.com (2603:10b6:a03:39c::33) To SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB6733:EE_|PH8PR11MB6610:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a57f934-a203-4d9d-a4f9-08dbf81a8dd1 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZKixL/5TFnmkTaacq2pdLQkD6JwKB1FcaG1q4OIG5K6+ZU3uhb9+gH0ue3OjpAUB/YZ4D3PHs3RhRRgY0Gp984K8OactQRd7G5OV2xrCyIXGwuQyQKkMmRUy7HAhOPeGPBj4RIXdkBMwPuml/WccwOFIfCfjBfvs/Oq8zo0RzObCh+9XXZETG9H/+abxXSmVeEA6VRDcnUEeV/CRnJ5H4hxZBHoZA/WMFfTPfelHW3lyxENV3KVP1h9g3uPKBHVLHaY7kzzfJhv1Z2dO7GurzPoiMpPkwB+iMzoj7v943TpiO9CI22kmwXPc7ETxIh6WWTyeP0z5cQ6eKrITLhGMKCHFuB109aMibm43C75gMfhLCZCw5mW7IzOQ4DXDn0HjOJPeI8dAVmOpMqrABubPSldWkh9+ZP1kTr+vxEoasMVLfU8mrDDYECVDOvxjKdci4cLMvQTlM4cnutSY2ILPoPj2EK0930fzfykDXqjL2II2+DcevrMISR7Bm2TYeReygbY67Li0gbGFxskXGIm+bP3CBfNzoRzEBC/s4bDeL+O6EE7HQOZ/m3K1ILvv+GwC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB6733.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(366004)(376002)(396003)(346002)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(316002)(54906003)(4326008)(110136005)(66476007)(66946007)(66556008)(478600001)(6666004)(2906002)(6486002)(5660300002)(8936002)(83380400001)(86362001)(44832011)(82960400001)(38100700002)(107886003)(26005)(41300700001)(8676002)(6506007)(6512007)(9686003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?n2PzhorG0bna5swTIVILQKJEVDfFt9VS3r5R43c15pGlbGrd1TvAzLzU7+Je?= =?us-ascii?Q?gKy8EDZkzYAiqP3oN03Y+cDTLSQLxQ9Cc3vFFZXNwWB2I4d7kCDBC42TuB74?= =?us-ascii?Q?ZL1SSPr+OOMf14V97ZrJdqfEouzAPaspWZB1d7SzB9U3jkoICeAYYBQ/Fg8u?= =?us-ascii?Q?CLPqXhrazx1d2EqDqosRyflN3oxezcMqKiqV4catTTllcXfdKrOZRxCJhz2j?= =?us-ascii?Q?sKiIieGvM/KD8pvL0dpfZtadAG6LrbKvioNaEfPGY1AMegJd35YoT19KGlOD?= =?us-ascii?Q?CR9035ltmsnDtZ9zpFDPjQKo9Q1W8+q4M/YSacpfDR3jsFf5LMAU4W9Edzq2?= =?us-ascii?Q?9Cffy6zVYdbnU/Fv2SQW8NXv3gtfRjNGTJakdujmR+KFdXZ/WjjrV75bwrAO?= =?us-ascii?Q?rGxhoRj95DL/eXFCQpGZW6FEoZPGkPw0JJ1BaaM0QwolaZdT+tpfuNV55Ig/?= =?us-ascii?Q?aRFHtuJUNnGp9TiwB1Ko8UoYCJrPrIoqaM2ht2hbp0ufgE2zONdHzIT2uLvT?= =?us-ascii?Q?wAzF08927DQqaC46X8HvuKHQ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?= =?us-ascii?Q?njIqgSIh/FuV7DdYprKlGNFcDqj1OiaHCiACrET9X8prCym7PIdIZ6iwfGlq?= =?us-ascii?Q?EBrTPq+fjPLFN+gbC7aHIjB9ZI1YPU12+y3ix5j6js4dyElDPAKHR+NTndIp?= =?us-ascii?Q?jwhPKroaA70Yj5m16ROQeeh3oTtJ5j+FPHyRyjlu?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0a57f934-a203-4d9d-a4f9-08dbf81a8dd1 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB6733.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 18:21:53.7019 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cq/r6jrDEX2K8jRdr+Y9DNvsuqlYSNGxxWf0+CB3qde3+kxozLnf56o27hVRh14b7C3gcSDTHCa/b7myutM3sQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6610 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 pete.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 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 10:22:13 -0800 (PST) Dan Williams wrote: > Ira Weiny wrote: > > CPER CXL events do not have a UUID associated with them. It is > > desirable to share event structures between the CPER CXL event and the > > CXL event log events. > > This parses strange to me, maybe it is trying to capture too many > changes in too few sentences? Something like this instead? Yea probably just trying to squeeze too much in. > > "CXL CPER events are identified by the CPER Section Type GUID. The GUID > correlates with the CXL UUID for the event record. It turns out that a > CXL CPER record is a strict subset of the CXL event record, only the > UUID header field is chopped. > > In order to unify handling between native and CPER flavors of CXL > events, prepare the code for the UUID to be passed in rather than > inferred from the record itself. > > Later patches update the passed in record to only refer to the common > data between the formats." That looks much more detailed. I'll add it in. [snip] > > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h > > index a0b5819bc70b..2aef185f4cd0 100644 > > --- a/drivers/cxl/core/trace.h > > +++ b/drivers/cxl/core/trace.h > > @@ -189,7 +189,7 @@ TRACE_EVENT(cxl_overflow, > > __string(memdev, dev_name(&cxlmd->dev)) \ > > __string(host, dev_name(cxlmd->dev.parent)) \ > > __field(int, log) \ > > - __field_struct(uuid_t, hdr_uuid) \ > > + __field_struct(uuid_t, uuid) \ > > Hmm, is it too late to make this rename? I.e. would a script that is > looking for "hdr_uuid" in one kernel be broken by the rename of the > field to "uuid" in the next? True, probably best to leave the field name alone. I'll change it back. > > > __field(u64, serial) \ > > __field(u32, hdr_flags) \ > > __field(u16, hdr_handle) \ > > @@ -198,12 +198,12 @@ TRACE_EVENT(cxl_overflow, > > __field(u8, hdr_length) \ > > __field(u8, hdr_maint_op_class) > > > > -#define CXL_EVT_TP_fast_assign(cxlmd, l, hdr) \ > > +#define CXL_EVT_TP_fast_assign(cxlmd, l, uuid, hdr) \ > > __assign_str(memdev, dev_name(&(cxlmd)->dev)); \ > > __assign_str(host, dev_name((cxlmd)->dev.parent)); \ > > __entry->log = (l); \ > > __entry->serial = (cxlmd)->cxlds->serial; \ > > - memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \ > > + memcpy(&__entry->uuid, (uuid), sizeof(uuid_t)); \ > > Per above this would be: > > memcpy(&__entry->hdr_uuid, (uuid), sizeof(uuid_t)); \ yep. > > > __entry->hdr_length = (hdr).length; \ > > __entry->hdr_flags = get_unaligned_le24((hdr).flags); \ > > __entry->hdr_handle = le16_to_cpu((hdr).handle); \ > > @@ -217,7 +217,7 @@ TRACE_EVENT(cxl_overflow, > > "maint_op_class=%u : " fmt, \ > > __get_str(memdev), __get_str(host), __entry->serial, \ > > cxl_event_log_type_str(__entry->log), \ > > - __entry->hdr_timestamp, &__entry->hdr_uuid, __entry->hdr_length,\ > > + __entry->hdr_timestamp, &__entry->uuid, __entry->hdr_length, \ > > ...and this change could be dropped. Yep. All done. > > Other than that, this looks good to me. Thanks, Ira