Skip to content

Commit dfeb916

Browse files
Marc Zyngieroupton
authored andcommitted
KVM: arm64: nv: Add missing EL2->EL1 mappings in get_el2_to_el1_mapping()
As KVM has grown a bunch of new system register for NV, it appears that we are missing them in the get_el2_to_el1_mapping() list. Most of them are not crucial as they don't tend to be accessed via vcpu_read_sys_reg() and vcpu_write_sys_reg(). Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent a5c870d commit dfeb916

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arch/arm64/kvm/sys_regs.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ static bool get_el2_to_el1_mapping(unsigned int reg,
110110
PURE_EL2_SYSREG( RVBAR_EL2 );
111111
PURE_EL2_SYSREG( TPIDR_EL2 );
112112
PURE_EL2_SYSREG( HPFAR_EL2 );
113+
PURE_EL2_SYSREG( HCRX_EL2 );
114+
PURE_EL2_SYSREG( HFGRTR_EL2 );
115+
PURE_EL2_SYSREG( HFGWTR_EL2 );
116+
PURE_EL2_SYSREG( HFGITR_EL2 );
117+
PURE_EL2_SYSREG( HDFGRTR_EL2 );
118+
PURE_EL2_SYSREG( HDFGWTR_EL2 );
119+
PURE_EL2_SYSREG( HAFGRTR_EL2 );
120+
PURE_EL2_SYSREG( CNTVOFF_EL2 );
113121
PURE_EL2_SYSREG( CNTHCTL_EL2 );
114122
MAPPED_EL2_SYSREG(SCTLR_EL2, SCTLR_EL1,
115123
translate_sctlr_el2_to_sctlr_el1 );
@@ -130,6 +138,7 @@ static bool get_el2_to_el1_mapping(unsigned int reg,
130138
MAPPED_EL2_SYSREG(ELR_EL2, ELR_EL1, NULL );
131139
MAPPED_EL2_SYSREG(SPSR_EL2, SPSR_EL1, NULL );
132140
MAPPED_EL2_SYSREG(ZCR_EL2, ZCR_EL1, NULL );
141+
MAPPED_EL2_SYSREG(CONTEXTIDR_EL2, CONTEXTIDR_EL1, NULL );
133142
default:
134143
return false;
135144
}

0 commit comments

Comments
 (0)