From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC378C433F5 for ; Fri, 24 Sep 2021 02:34:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8160261019 for ; Fri, 24 Sep 2021 02:34:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8160261019 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IkJqBMoGK3Ay8aG+qH84fPOrUPlrMNAxzjiXHVShr2M=; b=fuR7TOaFIwX3bP 7RbLbWMrDaninPvXegXjypqjjfKJaZ5BLnqOs17a1gmiUJKcpIZqTY2bI0j5Qu/k8BOKYKRlWWQfn dSjETTCoo1UQB/ryUxVCQgg161bLWbMmr68KF1s10IHPANcQ7lEqRHZvn9SiZUf4JvOr/JkjYxLQQ osuLJFqyuhqnOtwIGVvZGb1mnifgGVK3vnwwplXqNBv9oPYNYlCIQOt/sIFZXRLXtYsfDVopVt8BW Ln2x9FHaFEXtDeX6iYpnDRGtFq/Mpin2H30Yuq9kdkqTMM6BAirEXv258o4EI7Do87a/Gp0syBb1f h00O9gJkJkBUOl+t3AHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTb04-00Cun8-HU; Fri, 24 Sep 2021 02:31:44 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTb00-00CumV-Oy for linux-arm-kernel@lists.infradead.org; Fri, 24 Sep 2021 02:31:42 +0000 Received: by mail-oi1-x22a.google.com with SMTP id y201so12557071oie.3 for ; Thu, 23 Sep 2021 19:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mUT08plGeX5Emeo2aNwfpHriiLePv2VUKF/wr4V45A4=; b=sqYzhYg+Ulp8TBwx9adVjRHj/KNWs7rlZDXD4VnySjt623ezTRNvAUs7UL7HW4VCXP dH7doOcHndpJp3vwcDERzePVSQrvl+6U2TOnkQbL/HK83i8hCNCYofcI9PGwnM72jWig s/e6zBQ4aO72/i1e96VEeE4ZpGBDIeYFZlp7BohsfCJtOsC8n3cFxziP2b00umiQlEPM zBNwpbHJsP1+hspTSGwQPShz0Ld8WpExtoGu+7lrlUQs0sCZBjY5mHn4QnDP+uE5CRMa a2XNx35ojB95RNdopiQHiIt4+KIlSAGi8KlTqV6HEgU8/P5kTcUE+e/JCabG+yZnKMD0 h3Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mUT08plGeX5Emeo2aNwfpHriiLePv2VUKF/wr4V45A4=; b=rBEwORIuTGdGUaGrwWpav13AdK5pK46gdaclylkzMfAFmymZsuV0DrLT/eovOh96BO R2IQUC/T27a0UpTLc93vVDG8VZHRqdwAK1rbFOcSEKaaP3czl9PKbmZQh+Ahs7fsLPAS qESf1yxRZsHlDPMSjs1pYrOj7OyVEwYB2pEFRno55yWosk2tFegZFzOXKxgvPmJ7+Jjo KX+sZR3WFDoJo3o1MqV2PGs9F8bewx8xW6iFFKlD+Ll6sYJliIzzke/4uvBW3wjNQMBN Dv1TEJE+fcoHJEizerb50raOmAyZMSskZ5rVRKVVvI3d4cK2avmeIDK0lCb3lX9U3bt2 EikA== X-Gm-Message-State: AOAM530oh5y5Yq+txdQVWfYAkiC7wr81srg8L8Ir/DArSltZOJYHB90R DETbrqdpuTF+6pFyjFAw7x4c9Q== X-Google-Smtp-Source: ABdhPJz3QwP0wn1WvFU+lYK8ASSvDCaN6bpC7MiDbLK/Vw6f/bvs68cMHru3V41xh7uAZSh17Xfhjw== X-Received: by 2002:aca:ac50:: with SMTP id v77mr9147446oie.15.1632450698812; Thu, 23 Sep 2021 19:31:38 -0700 (PDT) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id w7sm1112108oic.12.2021.09.23.19.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 19:31:38 -0700 (PDT) Date: Thu, 23 Sep 2021 21:31:36 -0500 From: Bjorn Andersson To: Mark Rutland Cc: Elliot Berman , Lorenzo Pieralisi , Sudeep Holla , Steven Rostedt , Ingo Molnar , Prasad Sodagudi , Guru Das Srinagesh , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 1/1] firmware: smccc: Add tracepoints when SMCCC calls are made Message-ID: References: <20210922223701.17521-1-quic_eberman@quicinc.com> <20210923112058.GA14893@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210923112058.GA14893@C02TD0UTHF1T.local> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210923_193140_838750_EFEFA258 X-CRM114-Status: GOOD ( 22.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu 23 Sep 06:21 CDT 2021, Mark Rutland wrote: > On Wed, Sep 22, 2021 at 03:37:00PM -0700, Elliot Berman wrote: > > Add trace events for SMCCC calls. These traces allow for convenient > > mechanism for kernel to log SMC/HVC instructions without requiring > > extracting traces from firmware. SMCCC spec currently [1] allows for 7 > > argument registers and 4 result registers. > > I think you've missed additions in recent versions of the spec. Since > SMCCCv1.2 (which is described in version of the document you've linked), > SMC64 calls may pass up to 17 argument registers (x1-x17) and receive up > to 18 result registers (x0-x17). SMC32 calls have up to 7 argument > registers (r1-r7) and up to 8 return registers (r0-r7). > > What do you want to use this for? What specifically do you want to > trace. > > I'm worried that this is a very low level transport, and hooking this > means tracing a bunch of unrelated users (e.g. PSCI, ARCH_WORKAROUND* > calls, vendor-specific SMC interfaces), and potentially gets in the way > of some of those use-cases (e.g. tracng this means it cannot be used > from noinstr code, which we likely need to be able to do in future). > > Generally I'd prefer to have tracepoints in specific drivers rather than > in the SMCCC transport. > I agree, putting the tracepoint at this low level will essentially provide us with a hexdump of all SMC operations and one would more or less need to so some post processing to get something useful out of it. And in the few cases where the arguments are references to data buffers there's no way to trace that content (e.g. qcom_scm_assign_mem()). If we move it one step up we can provide trace data that's directly useful to a human, provide insights in the data, allow for proper filtering etc. Regards, Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel