From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ABCF14F81 for ; Mon, 4 Dec 2023 09:29:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RfnG76CQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 793A6C433C7; Mon, 4 Dec 2023 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701682163; bh=XaVum5YjXtUDuTi45IJRgPlKMJ9dBPBxjFzwi8/8dZU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RfnG76CQIS3J1tbnbIaLg27LVoLIRR8YM4OFlrMipLm5GfGaCrt50sSVaUtubiRf+ H+ZWgqAhS0SNcToNoyYOJp5tvEBNWj3xV7iApvzvN8IijL7kwpg8vP1NKlpvBu1Qpp QPYz3o8HRWhE09tp1nQagkM1aQ/nEJRx7tJhODs1MEldaRwjqx4a+np7ZKMH917yKM UzmcF/gkxNqZsQMgRjUmhhUcgADxZA4ipmp9EV7WfRxXX1ErNgOPMBf+m3054XzpnT 2yoUy/XjiX4RdWsSYQ68mZs/KeYHYMYAraviQi+O4Q/aQ8gvWiAZpXK84laar4E0QJ wFMcxCMk4lNFA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rA5GS-001A1p-Nu; Mon, 04 Dec 2023 09:29:20 +0000 Date: Mon, 04 Dec 2023 09:29:20 +0000 Message-ID: <86plzmb9jj.wl-maz@kernel.org> From: Marc Zyngier To: James Clark Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, suzuki.poulose@arm.com, broonie@kernel.org, Oliver Upton , James Morse , Zenghui Yu , Catalin Marinas , Will Deacon , Mike Leach , Leo Yan , Alexander Shishkin , Anshuman Khandual , Rob Herring , Jintack Lim , Akihiko Odaki , Fuad Tabba , Joey Gouly , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/6] arm64: KVM: Move SPE and trace registers to the sysreg array In-Reply-To: <20231019165510.1966367-3-james.clark@arm.com> References: <20231019165510.1966367-1-james.clark@arm.com> <20231019165510.1966367-3-james.clark@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: james.clark@arm.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, suzuki.poulose@arm.com, broonie@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mike.leach@linaro.org, leo.yan@linaro.org, alexander.shishkin@linux.intel.com, anshuman.khandual@arm.com, robh@kernel.org, jintack.lim@linaro.org, akihiko.odaki@daynix.com, tabba@google.com, joey.gouly@arm.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 19 Oct 2023 17:55:00 +0100, James Clark wrote: > > pmscr_el1 and trfcr_el1 are currently special cased in the > host_debug_state struct, but they're just registers after all so give > them entries in the sysreg array and refer to them through the host > context. > > Reviewed-by: Suzuki K Poulose > Signed-off-by: James Clark > --- > arch/arm64/include/asm/kvm_host.h | 6 ++-- > arch/arm64/include/asm/kvm_hyp.h | 4 +-- > arch/arm64/kvm/hyp/nvhe/debug-sr.c | 44 +++++++++++++++--------------- > arch/arm64/kvm/hyp/nvhe/switch.c | 4 +-- > 4 files changed, 28 insertions(+), 30 deletions(-) > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > index 4a966c0d7373..7c82927ddaf2 100644 > --- a/arch/arm64/include/asm/kvm_host.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -437,6 +437,8 @@ enum vcpu_sysreg { > CNTHP_CVAL_EL2, > CNTHV_CTL_EL2, > CNTHV_CVAL_EL2, > + PMSCR_EL1, /* Statistical profiling extension */ > + TRFCR_EL1, /* Self-hosted trace filters */ Why this move? Are you also adding guest support for SPE? Until you do, I don't see the need to pollute the guest's sysreg namespace. M. -- Without deviation from the norm, progress is not possible. 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 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 6DA40C4167B for ; Mon, 4 Dec 2023 09:30:01 +0000 (UTC) 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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=790S5HCRclhX/rgHjYddFpJR/F66AyYLTmMBhMHqzZc=; b=oYUmuctzaBo/vi LytI5UsbTaYFXgtYQxUtnim3Aol1odfO6RUrStkYgdTHXNHcGXpKxG3gjwkCojbNVMBwuwKXEkikZ /L6O9bRBsa8wMTsvOJNkBp0VN5Jxw1oPBaBq6e1XqSV97K9CSQ7OnnWW4c0msyKHBzucUH5ozLOZ+ s4H4fIQQrpcBeDq+JEO6LuEjc1S3Dc70m2mdT7kKFVR1wRZK5r73FTFPzJQOKRDxPkevUO3HS7Xy7 SPYEFIbMto//KRzCBVkLCDGC1IBpyjr+QJOUjiOznXHSz9SktjM5alMzphlKevicHVLbhUuuTObQy ms8G0OUw6WTiG3aK5MXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rA5Gf-003PXW-1s; Mon, 04 Dec 2023 09:29:33 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rA5GX-003PUr-1o for linux-arm-kernel@lists.infradead.org; Mon, 04 Dec 2023 09:29:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 2DA9FB80CC1; Mon, 4 Dec 2023 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 793A6C433C7; Mon, 4 Dec 2023 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701682163; bh=XaVum5YjXtUDuTi45IJRgPlKMJ9dBPBxjFzwi8/8dZU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RfnG76CQIS3J1tbnbIaLg27LVoLIRR8YM4OFlrMipLm5GfGaCrt50sSVaUtubiRf+ H+ZWgqAhS0SNcToNoyYOJp5tvEBNWj3xV7iApvzvN8IijL7kwpg8vP1NKlpvBu1Qpp QPYz3o8HRWhE09tp1nQagkM1aQ/nEJRx7tJhODs1MEldaRwjqx4a+np7ZKMH917yKM UzmcF/gkxNqZsQMgRjUmhhUcgADxZA4ipmp9EV7WfRxXX1ErNgOPMBf+m3054XzpnT 2yoUy/XjiX4RdWsSYQ68mZs/KeYHYMYAraviQi+O4Q/aQ8gvWiAZpXK84laar4E0QJ wFMcxCMk4lNFA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rA5GS-001A1p-Nu; Mon, 04 Dec 2023 09:29:20 +0000 Date: Mon, 04 Dec 2023 09:29:20 +0000 Message-ID: <86plzmb9jj.wl-maz@kernel.org> From: Marc Zyngier To: James Clark Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, suzuki.poulose@arm.com, broonie@kernel.org, Oliver Upton , James Morse , Zenghui Yu , Catalin Marinas , Will Deacon , Mike Leach , Leo Yan , Alexander Shishkin , Anshuman Khandual , Rob Herring , Jintack Lim , Akihiko Odaki , Fuad Tabba , Joey Gouly , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/6] arm64: KVM: Move SPE and trace registers to the sysreg array In-Reply-To: <20231019165510.1966367-3-james.clark@arm.com> References: <20231019165510.1966367-1-james.clark@arm.com> <20231019165510.1966367-3-james.clark@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: james.clark@arm.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, suzuki.poulose@arm.com, broonie@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mike.leach@linaro.org, leo.yan@linaro.org, alexander.shishkin@linux.intel.com, anshuman.khandual@arm.com, robh@kernel.org, jintack.lim@linaro.org, akihiko.odaki@daynix.com, tabba@google.com, joey.gouly@arm.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231204_012926_522014_D6F97F7B X-CRM114-Status: GOOD ( 19.36 ) 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, 19 Oct 2023 17:55:00 +0100, James Clark wrote: > > pmscr_el1 and trfcr_el1 are currently special cased in the > host_debug_state struct, but they're just registers after all so give > them entries in the sysreg array and refer to them through the host > context. > > Reviewed-by: Suzuki K Poulose > Signed-off-by: James Clark > --- > arch/arm64/include/asm/kvm_host.h | 6 ++-- > arch/arm64/include/asm/kvm_hyp.h | 4 +-- > arch/arm64/kvm/hyp/nvhe/debug-sr.c | 44 +++++++++++++++--------------- > arch/arm64/kvm/hyp/nvhe/switch.c | 4 +-- > 4 files changed, 28 insertions(+), 30 deletions(-) > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > index 4a966c0d7373..7c82927ddaf2 100644 > --- a/arch/arm64/include/asm/kvm_host.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -437,6 +437,8 @@ enum vcpu_sysreg { > CNTHP_CVAL_EL2, > CNTHV_CTL_EL2, > CNTHV_CVAL_EL2, > + PMSCR_EL1, /* Statistical profiling extension */ > + TRFCR_EL1, /* Self-hosted trace filters */ Why this move? Are you also adding guest support for SPE? Until you do, I don't see the need to pollute the guest's sysreg namespace. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel