Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp960975pxb; Fri, 22 Apr 2022 15:23:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2HmXQkEAAGjcuio+X+FK4pg8eLAH1zOtIa6MDxhZMO66B9GhYPnfxKPmzn4pj0ypxZFv4 X-Received: by 2002:a17:902:bf4c:b0:15c:3d1b:8a47 with SMTP id u12-20020a170902bf4c00b0015c3d1b8a47mr4672826pls.118.1650666192687; Fri, 22 Apr 2022 15:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650666192; cv=none; d=google.com; s=arc-20160816; b=CJsafkivsrspjwbst+//SkYxhsKzda8T6twq0cllrkIj9Ig+JWn4ar/dREPLg/pKIr d5EYkboI8z/pgicAnA4YsIbYf8oYx4pIXhc13KwSM+VLW5K13LDA8Jr0JMXWbuAqAtoV TowK7H/Ghx6u+ulkMnT4jueP3GzSY/P6w6zWwkPKlU0lmfK9us+cE4QQ+M2txjUwuHc5 TGqd5VEfSTVCGb/hKpXEC0ZnmyFyAWgJu+NGVJLjUJrFkWMNZq8jmWgh8RylVXIFyILo KFx7DlmU8V0o8Ox6aXcf34RNK3xdmm88qbVJ/PnzXtRXKWlS4CLdpEoNr4LwFTc5Dn+T mESw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=BKicnuAWRuwK+fpe3fOFLFmGntRyaU1kavhwzDRfrY8=; b=fONDMDLtrz7CEYowLwb4HDsZFvJDYNq+1WWJQidT4pumvAQ5zioyf/Y5dj2LanDD09 sBrZjcsJ3F42l8sRYJl3mHPYhT0B/y9C57jyWzd66Sg9GEJV5dwQzt2iuclRWEiBdCce zASF0B3wZ+ocf4e1mkGIQvZ7HPwys/4mn1T3Y7h4knS1nzY0B13Ff+tVM0ACI8s/zW7j l8YXMiexpj30DfdLXjWaKX3rTyT5HoBF0oLQZj67Wmh05vZ+Lqj8jSu8enkKf1GHnW+Q 9nfDTRYZAPN6jBHmGFumNJnI9fstr+PMfrp2JNbtTS+ZHVtHtx6gYM4D+ndNte17zpwF wVgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cAfSDuCb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id na10-20020a17090b4c0a00b001ca8baaa48fsi12932040pjb.120.2022.04.22.15.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:23:12 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cAfSDuCb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7BDFD3CF55C; Fri, 22 Apr 2022 13:28:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384093AbiDUE3d (ORCPT + 99 others); Thu, 21 Apr 2022 00:29:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbiDUE33 (ORCPT ); Thu, 21 Apr 2022 00:29:29 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B2212602; Wed, 20 Apr 2022 21:26:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650515201; x=1682051201; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Z7jdM6pq07KjbTcwuki1ZSctHuXY7XcN+eSmZWx0l0M=; b=cAfSDuCbf7xBSYDM0O40TAf1HQ6qGlpdbPgBD7WQm3UU1PB8INVICZJn AwZv8AXz2ESdGhdW++ayrWRzfh78/StXsj8uWAylPGKOYVCdf4lvJvRPQ 8kk3k0bUQgOqKC0WQ53kHWhoqJ8zJOgiWPLms0Ud+vuudStbrbyf1/nrg zrQ+c31rp7fFtPV0vKMnjsQ40BUfxCH7cp4bFVpPyuWBv12gQYMZYoH2z wrNVW5+VUUQ1TJSXCzoncllW847OjHUEsWzIJt8Tt3fFJ5fJ4MAR1Of4D dB6DlAefyQYu8HPxxemPj+4Uub1rPY1CrdLkHgoIzIHjzGohNRQQHAvsG g==; X-IronPort-AV: E=McAfee;i="6400,9594,10323"; a="324672494" X-IronPort-AV: E=Sophos;i="5.90,277,1643702400"; d="scan'208";a="324672494" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 21:26:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,277,1643702400"; d="scan'208";a="727803522" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 20 Apr 2022 21:26:40 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 20 Apr 2022 21:26:40 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2308.27; Wed, 20 Apr 2022 21:26:39 -0700 Received: from fmsmsx610.amr.corp.intel.com ([10.18.126.90]) by fmsmsx610.amr.corp.intel.com ([10.18.126.90]) with mapi id 15.01.2308.027; Wed, 20 Apr 2022 21:26:39 -0700 From: "Luck, Tony" To: Steven Rostedt CC: "hdegoede@redhat.com" , "markgross@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "corbet@lwn.net" , "gregkh@linuxfoundation.org" , "andriy.shevchenko@linux.intel.com" , "Joseph, Jithu" , "Raj, Ashok" , "Williams, Dan J" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "patches@lists.linux.dev" , "Shankar, Ravi V" Subject: RE: [PATCH v3 10/11] trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations Thread-Topic: [PATCH v3 10/11] trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations Thread-Index: AQHYVAv/GMu0aAF5oU2sc2NlODgUPKz57MaA///Yp0A= Date: Thu, 21 Apr 2022 04:26:39 +0000 Message-ID: References: <20220407191347.9681-1-jithu.joseph@intel.com> <20220419163859.2228874-1-tony.luck@intel.com> <20220419163859.2228874-11-tony.luck@intel.com> <20220420193839.6e9d810b@gandalf.local.home> In-Reply-To: <20220420193839.6e9d810b@gandalf.local.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> +TRACE_EVENT(ifs_status, >> + >> + TP_PROTO(union ifs_scan activate, union ifs_status status), > > Really, you want to pass the structure in by value, so that we have two > copies? One to get to this function and then one to write to the ring > buffer? These "structures" are just bitfield helpers for a u64 that is passed into WRMSR (in the case of activate) and received back from RDMSR in the case of status. So this is really just a pair of u64 arguments, with the compiler handling the bit field extractions into the ring buffer. Here are the definitions: union ifs_scan { u64 data; struct { u32 start :8; u32 stop :8; u32 rsvd :16; u32 delay :31; u32 sigmce :1; }; }; union ifs_status { u64 data; struct { u32 chunk_num :8; u32 chunk_stop_index :8; u32 rsvd1 :16; u32 error_code :8; u32 rsvd2 :22; u32 control_error :1; u32 signature_error :1; }; }; Would it be better to do the bit extractions of the start/stop fields first= ? -Tony