Message ID | 20240122201852.262057-2-maz@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM/arm64: VM configuration enforcement | expand |
On Mon, Jan 22, 2024 at 08:18:28PM +0000, Marc Zyngier wrote: > Despite having the control bits for FEAT_SPECRES and FEAT_PACM, > the ID registers fields are either incomplete or missing. In general the registers tend to get updated register by register so it's not 100% surprising to get partial definition of features, though more usually it's the ID register that's there. > Fix it. Checking against DDI0601 2023-12 the additions here look correct with the proviso below, I didn't audit for other missing defintions in the two affected registers (ID_AA64ISAR[13]_EL1). Reviewed-by: Mark Brown <broonie@kernel.org> > --- > arch/arm64/tools/sysreg | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg > index fa3fe0856880..53daaaef46cb 100644 > --- a/arch/arm64/tools/sysreg > +++ b/arch/arm64/tools/sysreg > @@ -1366,6 +1366,7 @@ EndEnum > UnsignedEnum 43:40 SPECRES > 0b0000 NI > 0b0001 IMP > + 0b0010 COSP_RCTX This is OK in itself but there's also a copy of this in ID_ISAR6_EL1 which needs updating too (and presumably ought to be considered by the hypervisor, I didn't look at anything else yet).
diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index fa3fe0856880..53daaaef46cb 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -1366,6 +1366,7 @@ EndEnum UnsignedEnum 43:40 SPECRES 0b0000 NI 0b0001 IMP + 0b0010 COSP_RCTX EndEnum UnsignedEnum 39:36 SB 0b0000 NI @@ -1492,7 +1493,12 @@ EndEnum EndSysreg Sysreg ID_AA64ISAR3_EL1 3 0 0 6 3 -Res0 63:12 +Res0 63:16 +UnsignedEnum 15:12 PACM + 0b0000 NI + 0b0001 TRIVIAL_IMP + 0b0010 FULL_IMP +EndEnum UnsignedEnum 11:8 TLBIW 0b0000 NI 0b0001 IMP
Despite having the control bits for FEAT_SPECRES and FEAT_PACM, the ID registers fields are either incomplete or missing. Fix it. Signed-off-by: Marc Zyngier <maz@kernel.org> --- arch/arm64/tools/sysreg | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)