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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 9485DC433E7 for ; Tue, 13 Oct 2020 14:52:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 20D792488A for ; Tue, 13 Oct 2020 14:52:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AjEuVgd7"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="dBTc6t2P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20D792488A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=/9bKMF2EPOBeTG3O/kpe4em6kFxRKAk33q+kqZ3BZHo=; b=AjEuVgd7MgaRfqnRP5CaKu+pH KIW3OVv71F/SjNUMwdfXlFhYYBf8NdthEvTEuvDmmyMUAqDRYSD4h46gSKBPRrf5bw1kEOcvmYV+Y vGcnlTc/26r2IMcmX3GNvt5UiXnhG57eOSBldMEVd9BYLLTTArsXYOnIIXoQbb9K7Ler30urx1fLt katvaoOjEBc7XbuNs1ZUbS21y5AJhHyKQ6myD3OXQCGMqGsk04SYMLXsNfH8Wp50kEDh6vIbsE+wa zJpfeGLyu6dLT9auJlKmFFv4RX/p77g+FU1j290/TRcw2klcHf7srgjMzeluRd5hZ/c+YMs7Si8h1 Npfe6bFRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSLdv-0007OE-R6; Tue, 13 Oct 2020 14:51:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSLdt-0007O4-LU for linux-arm-kernel@merlin.infradead.org; Tue, 13 Oct 2020 14:51:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9IxO65SYoQz9BxoJmxmBg82U7yAJHBAlGa0sA1clkM8=; b=dBTc6t2PNKmSJoQPcvDMl5s+Pi 2d/3o0mlZYekoXx5Ac58vtRzprhQrYeOcPZ75SGYeR0JbqXisjZgxm8a3h/zGOekr+j8wy5Jbbc1J SBL8lJG/M3ZY0lMSIXOuXJr4SVP+5e8EB+Di5kGTU/42zBvbeoSTiY/lAgy40o/viROevVNGSVF+x 7iCVtB2gAo2VWEevMYpDGyottk6yKGqqWha2ucvk7wjWwmf2lyuHJerKUtPH9e/fU98kcxpNR35CK ezJFKKKAHjD3tRdKP1xMBRWwL9qD7T2hX5ZG3x6XHCCkicIJBlkDvoUEl6HheJ3HsRtUmq1oLDzn8 RBxTc4OA==; Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSLdr-0006Mz-T3; Tue, 13 Oct 2020 14:51:08 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 716E84047F; Tue, 13 Oct 2020 11:51:03 -0300 (-03) Date: Tue, 13 Oct 2020 11:51:03 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Subject: Re: [PATCH 4/5] perf: arm_spe: Decode memory tagging properties Message-ID: <20201013145103.GE1063281@kernel.org> References: <20200922101225.183554-1-andre.przywara@arm.com> <20200922101225.183554-5-andre.przywara@arm.com> <20200927031918.GD9677@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200927031918.GD9677@leoy-ThinkPad-X240s> X-Url: http://acmel.wordpress.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Suzuki K Poulose , Peter Zijlstra , Andre Przywara , Jiri Olsa , linux-kernel@vger.kernel.org, Alexander Shishkin , Ingo Molnar , James Clark , Catalin Marinas , Namhyung Kim , Will Deacon , Tan Xiaojun , linux-arm-kernel@lists.infradead.org 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 Em Sun, Sep 27, 2020 at 11:19:18AM +0800, Leo Yan escreveu: > On Tue, Sep 22, 2020 at 11:12:24AM +0100, Andre Przywara wrote: > > When SPE records a physical address, it can additionally tag the event > > with information from the Memory Tagging architecture extension. > > > > Decode the two additional fields in the SPE event payload. > > > > Signed-off-by: Andre Przywara > > --- > > .../util/arm-spe-decoder/arm-spe-pkt-decoder.c | 17 ++++++++++++----- > > 1 file changed, 12 insertions(+), 5 deletions(-) > > > > diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c > > index 943e4155b246..a033f34846a6 100644 > > --- a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c > > +++ b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c > > @@ -8,13 +8,14 @@ > > #include > > #include > > #include > > +#include > > > > #include "arm-spe-pkt-decoder.h" > > > > -#define BIT(n) (1ULL << (n)) > > - > > #define NS_FLAG BIT(63) > > #define EL_FLAG (BIT(62) | BIT(61)) > > +#define CH_FLAG BIT(62) > > +#define PAT_FLAG GENMASK_ULL(59, 56) > > > > #define SPE_HEADER0_PAD 0x0 > > #define SPE_HEADER0_END 0x1 > > @@ -447,10 +448,16 @@ int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, > > return snprintf(buf, buf_len, "%s 0x%llx el%d ns=%d", > > (idx == 1) ? "TGT" : "PC", payload, el, ns); > > case 2: return snprintf(buf, buf_len, "VA 0x%llx", payload); > > - case 3: ns = !!(packet->payload & NS_FLAG); > > + case 3: { > > + int ch = !!(packet->payload & CH_FLAG); > > + int pat = (packet->payload & PAT_FLAG) >> 56; > > + > > + ns = !!(packet->payload & NS_FLAG); > > payload &= ~(0xffULL << 56); > > - return snprintf(buf, buf_len, "PA 0x%llx ns=%d", > > - payload, ns); > > + return snprintf(buf, buf_len, > > + "PA 0x%llx ns=%d ch=%d, pat=%x", > > + payload, ns, ch, pat); > > + } > > Reviewed-by: Leo Yan Thanks, applied. - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel