[PATCH v3 2/6] arm64: KVM: Move SPE and trace registers to the sysreg array
Marc Zyngier
maz at kernel.org
Mon Dec 4 01:29:20 PST 2023
On Thu, 19 Oct 2023 17:55:00 +0100,
James Clark <james.clark at arm.com> 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 <suzuki.poulose at arm.com>
> Signed-off-by: James Clark <james.clark at arm.com>
> ---
> 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.
More information about the linux-arm-kernel
mailing list