Skip to content

Commit 557c82a

Browse files
james-c-linaroMarc Zyngier
authored andcommitted
KVM: arm64: Add trap configs for PMSDSFR_EL1
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>
1 parent 5f9466b commit 557c82a

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

arch/arm64/include/asm/vncr_mapping.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@
9494
#define VNCR_PMSICR_EL1 0x838
9595
#define VNCR_PMSIRR_EL1 0x840
9696
#define VNCR_PMSLATFR_EL1 0x848
97+
#define VNCR_PMSNEVFR_EL1 0x850
98+
#define VNCR_PMSDSFR_EL1 0x858
9799
#define VNCR_TRFCR_EL1 0x880
98100
#define VNCR_MPAM1_EL1 0x900
99101
#define VNCR_MPAMHCR_EL2 0x930

arch/arm64/kvm/emulate-nested.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ static const struct encoding_to_trap_config encoding_to_cgt[] __initconst = {
11851185
SR_TRAP(SYS_PMSIRR_EL1, CGT_MDCR_TPMS),
11861186
SR_TRAP(SYS_PMSLATFR_EL1, CGT_MDCR_TPMS),
11871187
SR_TRAP(SYS_PMSNEVFR_EL1, CGT_MDCR_TPMS),
1188+
SR_TRAP(SYS_PMSDSFR_EL1, CGT_MDCR_TPMS),
11881189
SR_TRAP(SYS_TRFCR_EL1, CGT_MDCR_TTRF),
11891190
SR_TRAP(SYS_TRBBASER_EL1, CGT_MDCR_E2TB),
11901191
SR_TRAP(SYS_TRBLIMITR_EL1, CGT_MDCR_E2TB),

arch/arm64/kvm/sys_regs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,6 +3083,7 @@ static const struct sys_reg_desc sys_reg_descs[] = {
30833083
{ SYS_DESC(SYS_PMBLIMITR_EL1), undef_access },
30843084
{ SYS_DESC(SYS_PMBPTR_EL1), undef_access },
30853085
{ SYS_DESC(SYS_PMBSR_EL1), undef_access },
3086+
{ SYS_DESC(SYS_PMSDSFR_EL1), undef_access },
30863087
/* PMBIDR_EL1 is not trapped */
30873088

30883089
{ PMU_SYS_REG(PMINTENSET_EL1),

0 commit comments

Comments
 (0)