]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: Add trap configs for PMSDSFR_EL1
authorJames Clark <james.clark@linaro.org>
Mon, 1 Sep 2025 12:40:36 +0000 (13:40 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Sep 2025 13:30:49 +0000 (14:30 +0100)
SPE data source filtering (SPE_FEAT_FDS) adds a new register
PMSDSFR_EL1, add the trap configs for it. PMSNEVFR_EL1 was also missing
its VNCR offset so add it along with PMSDSFR_EL1.

Tested-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/vncr_mapping.h
arch/arm64/kvm/emulate-nested.c
arch/arm64/kvm/sys_regs.c

index f6ec500ad3fa0d22ea815a65eef8f47c506aaadd..c2485a862e6904f3823b3d18c16cb2b1e385066a 100644 (file)
@@ -94,6 +94,8 @@
 #define VNCR_PMSICR_EL1         0x838
 #define VNCR_PMSIRR_EL1         0x840
 #define VNCR_PMSLATFR_EL1       0x848
+#define VNCR_PMSNEVFR_EL1       0x850
+#define VNCR_PMSDSFR_EL1        0x858
 #define VNCR_TRFCR_EL1          0x880
 #define VNCR_MPAM1_EL1          0x900
 #define VNCR_MPAMHCR_EL2        0x930
index 90cb4b7ae0ff748453a6495b7dca1c2eb9db3893..aeaba7813275afba3801f98977faec634a05d725 100644 (file)
@@ -1185,6 +1185,7 @@ static const struct encoding_to_trap_config encoding_to_cgt[] __initconst = {
        SR_TRAP(SYS_PMSIRR_EL1,         CGT_MDCR_TPMS),
        SR_TRAP(SYS_PMSLATFR_EL1,       CGT_MDCR_TPMS),
        SR_TRAP(SYS_PMSNEVFR_EL1,       CGT_MDCR_TPMS),
+       SR_TRAP(SYS_PMSDSFR_EL1,        CGT_MDCR_TPMS),
        SR_TRAP(SYS_TRFCR_EL1,          CGT_MDCR_TTRF),
        SR_TRAP(SYS_TRBBASER_EL1,       CGT_MDCR_E2TB),
        SR_TRAP(SYS_TRBLIMITR_EL1,      CGT_MDCR_E2TB),
index 82ffb3b3b3cf770a94213f4c7bac25487d18453b..d1a55cf589b7e77e69a7aab27a0204e030a3ef84 100644 (file)
@@ -3083,6 +3083,7 @@ static const struct sys_reg_desc sys_reg_descs[] = {
        { SYS_DESC(SYS_PMBLIMITR_EL1), undef_access },
        { SYS_DESC(SYS_PMBPTR_EL1), undef_access },
        { SYS_DESC(SYS_PMBSR_EL1), undef_access },
+       { SYS_DESC(SYS_PMSDSFR_EL1), undef_access },
        /* PMBIDR_EL1 is not trapped */
 
        { PMU_SYS_REG(PMINTENSET_EL1),