From patchwork Fri Dec 20 07:22:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13916311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DCC4AE77188 for ; Fri, 20 Dec 2024 07:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=bUD8O2WJOissSmcWODiLGzBoMI3bekm/jIAUjiuU5ko=; b=nFzMUrmMT37nKFw9x3GL1b2A35 8k0jI9uYciGeFCSFbioAxdQ9ELyQtQi9nXmoDlRExoucTva93+Ms8q/F0wA9CA/dIu3w/CgbSaBS3 TrRwF1p6/jCJSUHpA/0Cy4TkINkeSwaRkd5du4/u9N9YWAGmCDsmOTXkJclldv3Rk6lCaQ2/V+DZx piuEP8qLl9msnDCtE+TqNvNyKqKWIJueqweNEOonCO7mU5wa4i9MjXA2cRaAxDcNLPPcfEnSSSSYJ wrIJM0tO/YnTKdUvXJE8ZQSx0jYBC50jVmYA6v7WPtV8Z08FZP9JNd955Lw32+tqLT51akE0yQU3n AwWVFvhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOXMk-000000049vD-2dl7; Fri, 20 Dec 2024 07:24:06 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOXLb-000000049fe-2059 for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2024 07:22:56 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 000ED1480; Thu, 19 Dec 2024 23:23:21 -0800 (PST) Received: from a077893.arm.com (unknown [10.163.51.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 941143F58B; Thu, 19 Dec 2024 23:22:47 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Marc Zyngier , Ryan Roberts , Mark Rutland , Mark Brown , Oliver Upton , Jonathan Corbet , Eric Auger , kvmarm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/7] arm64/boot: Enable EL2 requirements for FEAT_PMUv3p9 Date: Fri, 20 Dec 2024 12:52:33 +0530 Message-Id: <20241220072240.1003352-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241219_232255_560695_34888E52 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds fine grained trap control in EL2 required for FEAT_PMUv3p9 registers like PMICNTR_EL0, PMICFILTR_EL0, and PMUACR_EL1 which are already being used in the kernel. This is required to prevent their EL1 access trap into EL2. PMZR_EL0 register trap control i.e HDFGWTR2_EL2.nPMZR_EL0 remains unchanged for now as it does not get accessed in the kernel, and there is no plan for its access from user space. I have taken the liberty to pick up all the review tags for patches related to tools sysreg update from the KVM FGT2 V2 patch series posted earlier. https://lore.kernel.org/all/20241210055311.780688-1-anshuman.khandual@arm.com/ Rob had earler mentioned about FEAT_FGT2 based trap control requirement for FEAT_PMUv3p9 registers that are currently being used in kernel. The context can be found here. https://lore.kernel.org/all/20241216234251.GA629562-robh@kernel.org/ This series is based on v6.13-rc3 Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Ryan Roberts Cc: Mark Rutland Cc: Mark Brown Cc: Rob Herring Cc: Oliver Upton Cc: Jonathan Corbet Cc: Eric Auger Cc: kvmarm@lists.linux.dev Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Anshuman Khandual (7): arm64/sysreg: Update register fields for ID_AA64MMFR0_EL1 arm64/sysreg: Add register fields for HDFGRTR2_EL2 arm64/sysreg: Add register fields for HDFGWTR2_EL2 arm64/sysreg: Add register fields for HFGITR2_EL2 arm64/sysreg: Add register fields for HFGRTR2_EL2 arm64/sysreg: Add register fields for HFGWTR2_EL2 arm64/boot: Enable EL2 requirements for FEAT_PMUv3p9 Documentation/arch/arm64/booting.rst | 18 +++++ arch/arm64/include/asm/el2_setup.h | 25 +++++++ arch/arm64/tools/sysreg | 103 +++++++++++++++++++++++++++ 3 files changed, 146 insertions(+)