Message ID | 20220825-arm-spe-v8-7-v4-0-327f860daf28@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2338060wrt; Mon, 9 Jan 2023 11:27:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXssJgLDjOyNbSzlTL7PqHdSjKLlAKJ8VWwJFT3GZyEuS4xMStkG3gVc3zbwyU7sFOuKBxPW X-Received: by 2002:a17:903:2d0:b0:192:b5b3:7ff5 with SMTP id s16-20020a17090302d000b00192b5b37ff5mr39855153plk.50.1673292478749; Mon, 09 Jan 2023 11:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673292478; cv=none; d=google.com; s=arc-20160816; b=M0aRmJaH0r7WKpAWPTSGf4kwa6j2GF+rQ9sFhs9BEskH2X6Ydv3eq/+XBCr8C1Mnkp g+ifoEK+Qf6ddEj1BHC9QDPUsDYhArSRocFGlNyqWfK3c81+J2eybJ5FzwHHLqEEpNGn kGWqP++KbOWf8UssrM9gTCMKDgc04IXiVyrfdC7PdGiwE9WHsKKsH95YQILGs9cWzGxz lfhe5VIgj9BeebMrVWWaGeJbM5zXuMjDL7Pc44cNlUqymm9lEOEg4I3y1etNBEl3C6Rm YufjH8x6FytAzIvUc7HjLRW+H8NImYKZKc8rSrqXIFj4EmJvLk7YRB+GAG5Ix5/qFhbZ e3bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from; bh=yp8JdvF4JGjAOoO+JkWqYIq2KRzORi/rQl4T8RRSxME=; b=YyLIDxgz53toA9q5qKLI95aeYI7J8Db52/IVXnikTEM3EQzozYCpbJACVDBKukHisM WisHqpvqVMrr2lhjgxJtYOi5dAK6oj/k2NUcmK3fq56BVuA+eMQC+4V0+iP1g3TWdC0a hrp0gGlPq0GWSm/aUr8w3K769VAvyXkNZxbO4+9v5OBCGyZKh3eVGQI2jWPRmVNQ0izq dhvFbm056Cq1HY9lAQP4i104SInZpuqBS82IREVLaxaYi79JoWYLiJvDpPpLqePLFdBa K3L6ADg+bq8ll76oUVT18maRP6/9UM4ZIUQf3NkzlAb4w5vJFGYObAiwfn6wysVCaaBW 9bdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a170903200b00b00180a7ff784csi8778178pla.360.2023.01.09.11.27.45; Mon, 09 Jan 2023 11:27:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235365AbjAIT0h (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Mon, 9 Jan 2023 14:26:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234413AbjAIT0e (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Jan 2023 14:26:34 -0500 Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1DFE41664; Mon, 9 Jan 2023 11:26:33 -0800 (PST) Received: by mail-oo1-f43.google.com with SMTP id b10-20020a4a9fca000000b004e6f734c6b4so2677354oom.9; Mon, 09 Jan 2023 11:26:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yp8JdvF4JGjAOoO+JkWqYIq2KRzORi/rQl4T8RRSxME=; b=LoIOKT6QKBAOz9G7xQClga9Y8R9jUbhStXwHe2ZHcMBIDgYeGE7baJXQvbF/WnATNM NO++AxPLvhpLqxQpAwomntl5xP5dLRNraLqt3RYPvANDj4gC8dt/uTZ9ewa4R+dNR3i7 kACGavUNGIWB9WIHDW4fbcIE/5IdI44vGQIYQGz7ga6yNbRJi6y3J/5tQQNLyY9ZFCty eyke1F1CUpwWTx/tuS4WPRt37KcT6rcMmP/Lyug4CAInELlOb8XMMlJp3LKjjMlJsazY /BR53V/CM0m89eKnWy+pg9eA694qwU2IfCqs/XLOvuA4uw1fOXVidbgijWEu0h5t29QA LdyQ== X-Gm-Message-State: AFqh2koatA5zmvxtSGMJH2VPQxpsrYHg/53xEYGlWyo3sByeXmRuwGm3 ACPbMX8fKhGg4aWwixhcBNrauLsTJA== X-Received: by 2002:a4a:9613:0:b0:4a3:9f7a:add0 with SMTP id q19-20020a4a9613000000b004a39f7aadd0mr28637976ooi.5.1673292392657; Mon, 09 Jan 2023 11:26:32 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id e40-20020a056820062800b004f1c4baa96bsm4640563oow.6.2023.01.09.11.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 11:26:32 -0800 (PST) Received: (nullmailer pid 1483603 invoked by uid 1000); Mon, 09 Jan 2023 19:26:31 -0000 From: Rob Herring <robh@kernel.org> Subject: [PATCH v4 0/8] perf: Arm SPEv1.2 support Date: Mon, 09 Jan 2023 13:26:17 -0600 Message-Id: <20220825-arm-spe-v8-7-v4-0-327f860daf28@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAFlqvGMC/33NQQrCMBAF0KuUrB1JJ20TXXkPcZGm0zZYU0k0I KV3d3AnYlfD//D+LCJR9JTEsVhEpOyTnwOHalcIN9owEPiOs0CJKA3WYOMN0p0gG9DQU9fLisqm RyWYtDYRtNEGNzIKz2nicvTpMcfX50Uu+Zz/rOUSJDhdt6Y7IDUHPF0pBpr2cxzEhZcybmlkTUo rxK4x1skfrba0Ym10Y7DXxlnrvvS6rm9MxsJPKgEAAA== To: Peter Zijlstra <peterz@infradead.org>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Oliver Upton <oliver.upton@linux.dev>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org> Cc: Mark Brown <broonie@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, James Clark <james.clark@arm.com> X-Mailer: b4 0.12-dev X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754574334110998665?= X-GMAIL-MSGID: =?utf-8?q?1754574334110998665?= |
Series |
perf: Arm SPEv1.2 support
|
|
Message
Rob Herring
Jan. 9, 2023, 7:26 p.m. UTC
Peter, this series is blocked on an ack from you on patch 7. There was
some discussion on validation of the 'config3' attr. The options where
laid out by Mark here[0]. Please chime in on your preference.
Will, can you pick up patches 1-6 at least if there's no progress on
'config3'.
This series adds support for Arm SPEv1.2 which is part of the
Armv8.7/Armv9.2 architecture. There's 2 new features that affect the
kernel: a new event filter bit, branch 'not taken', and an inverted
event filter register.
Since this support adds new registers and fields, first the SPE register
defines are converted to automatic generation.
The perf tool side changes are available here[1].
Tested on FVP.
[0] https://lore.kernel.org/all/Y49ttrv6W5k3ZNYw@FVFF77S0Q05N.cambridge.arm.com/
[1] https://lore.kernel.org/all/20220914-arm-perf-tool-spe1-2-v2-v4-0-83c098e6212e@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org>
---
Changes in v4:
- Rebase on v6.2-rc1
- Link to v3: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v3-0-87682f78caac@kernel.org
Changes in v3:
- Add some more missing SPE register fields and use Enums for some
fields
- Use the new PMSIDR_EL1 register Enum defines in the SPE driver
- Link to v2: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v2-0-e37322d68ac0@kernel.org
Changes in v2:
- Convert the SPE register defines to automatic generation
- Fixed access to SYS_PMSNEVFR_EL1 when not present
- Rebase on v6.1-rc1
- Link to v1: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v1-0-c75b8d92e692@kernel.org
---
Rob Herring (8):
perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines
arm64: Drop SYS_ from SPE register defines
arm64/sysreg: Convert SPE registers to automatic generation
perf: arm_spe: Drop BIT() and use FIELD_GET/PREP accessors
perf: arm_spe: Use new PMSIDR_EL1 register enums
perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event
perf: Add perf_event_attr::config3
perf: arm_spe: Add support for SPEv1.2 inverted event filtering
arch/arm64/include/asm/el2_setup.h | 6 +-
arch/arm64/include/asm/sysreg.h | 99 +++--------------------
arch/arm64/kvm/debug.c | 2 +-
arch/arm64/kvm/hyp/nvhe/debug-sr.c | 2 +-
arch/arm64/tools/sysreg | 139 +++++++++++++++++++++++++++++++++
drivers/perf/arm_spe_pmu.c | 156 ++++++++++++++++++++++++-------------
include/uapi/linux/perf_event.h | 3 +
7 files changed, 257 insertions(+), 150 deletions(-)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20220825-arm-spe-v8-7-fedf04e16f23
Best regards,
Comments
On Mon, 09 Jan 2023 13:26:17 -0600, Rob Herring wrote: > Peter, this series is blocked on an ack from you on patch 7. There was > some discussion on validation of the 'config3' attr. The options where > laid out by Mark here[0]. Please chime in on your preference. > > Will, can you pick up patches 1-6 at least if there's no progress on > 'config3'. > > [...] Applied first six driver changes to will (for-next/perf), thanks! [1/8] perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines https://git.kernel.org/will/c/e080477a050c [2/8] arm64: Drop SYS_ from SPE register defines https://git.kernel.org/will/c/c759ec850df8 [3/8] arm64/sysreg: Convert SPE registers to automatic generation https://git.kernel.org/will/c/956936041a56 [4/8] perf: arm_spe: Drop BIT() and use FIELD_GET/PREP accessors https://git.kernel.org/will/c/2d347ac23362 [5/8] perf: arm_spe: Use new PMSIDR_EL1 register enums https://git.kernel.org/will/c/05e4c88e2b5c [6/8] perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event https://git.kernel.org/will/c/4998897b1e96 UAPI change needs feedback from perf core maintainers. Cheers,
On Mon, 09 Jan 2023 13:26:17 -0600, Rob Herring wrote: > Peter, this series is blocked on an ack from you on patch 7. There was > some discussion on validation of the 'config3' attr. The options where > laid out by Mark here[0]. Please chime in on your preference. > > Will, can you pick up patches 1-6 at least if there's no progress on > 'config3'. > > [...] Applied to will (for-next/perf), thanks! [1/8] perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines (no commit info) [2/8] arm64: Drop SYS_ from SPE register defines (no commit info) [3/8] arm64/sysreg: Convert SPE registers to automatic generation (no commit info) [4/8] perf: arm_spe: Drop BIT() and use FIELD_GET/PREP accessors (no commit info) [5/8] perf: arm_spe: Use new PMSIDR_EL1 register enums (no commit info) [6/8] perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event (no commit info) [7/8] perf: Add perf_event_attr::config3 https://git.kernel.org/will/c/09519ec3b19e [8/8] perf: arm_spe: Add support for SPEv1.2 inverted event filtering https://git.kernel.org/will/c/8d9190f00a97 Cheers,
On Tue, Feb 07, 2023 at 12:39:43PM +0000, Will Deacon wrote: > On Mon, 09 Jan 2023 13:26:17 -0600, Rob Herring wrote: > > Peter, this series is blocked on an ack from you on patch 7. There was > > some discussion on validation of the 'config3' attr. The options where > > laid out by Mark here[0]. Please chime in on your preference. > > > > Will, can you pick up patches 1-6 at least if there's no progress on > > 'config3'. > > > > [...] > > Applied to will (for-next/perf), thanks! > > [1/8] perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines > (no commit info) > [2/8] arm64: Drop SYS_ from SPE register defines > (no commit info) > [3/8] arm64/sysreg: Convert SPE registers to automatic generation > (no commit info) > [4/8] perf: arm_spe: Drop BIT() and use FIELD_GET/PREP accessors > (no commit info) > [5/8] perf: arm_spe: Use new PMSIDR_EL1 register enums > (no commit info) > [6/8] perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event > (no commit info) > [7/8] perf: Add perf_event_attr::config3 > https://git.kernel.org/will/c/09519ec3b19e > [8/8] perf: arm_spe: Add support for SPEv1.2 inverted event filtering > https://git.kernel.org/will/c/8d9190f00a97 I should've trimmed this, but just in case of confusion: I'd already picked up 1-6 prior to Peter's ack on the UAPI change. So now the whole series should be in tomorrow's -next with any luck. Thanks! Will