Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6694281rwl; Mon, 9 Jan 2023 11:42:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXtkBbi5/1DEQq2qXipDFC8l/LlCsO2dI7nV0t9i0k+NW9GW5nQdecGbAq5qWq0lHUQBtugs X-Received: by 2002:aa7:cd83:0:b0:45c:835b:9448 with SMTP id x3-20020aa7cd83000000b0045c835b9448mr52244808edv.4.1673293323166; Mon, 09 Jan 2023 11:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673293323; cv=none; d=google.com; s=arc-20160816; b=NxVqp3+8qoeLOXi3jNk1gdomQgsuw3+Jnr7+nEoC1ATfWEItG1Y297Apsik+3SZ6w4 3CGPHx7VTyRWcwgsToqNf/+plyuYCPjtwE+9yMalNGwT6/ZdwJ8OgrecubwKWHhCmZv6 iUdtFMVkBNiUTOY4800bRgDbQFRdWq7VqeNdihNaXZlwz8negUoiPy2DFA/63DFF6FqN XhJsj3C65FtOf+q5lnUfV0wGgIAygZ9O4VwwrMLpzE7RBd1Tqw+uk1boS9eL7jYeXGsO 85fqClcYoLrbi0ao2+zA7VMYCrnygroqJFus6ylBEw+EbSXUG5AR5VULWnEIX4UkO1zi NZug== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a05640250d300b0048b0ae570d8si12145243edb.508.2023.01.09.11.41.50; Mon, 09 Jan 2023 11:42:03 -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 + 53 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 ); 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 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 , Will Deacon , Mark Rutland , Catalin Marinas , Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim Cc: Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, James Clark 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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, -- Rob Herring