On Wed, 21 Jan 2026 10:16:31 +0000,
Zenghui Yu [off-list ref] wrote:
From: "Zenghui Yu (Huawei)" <redacted>
We had extended the sysreg masking infrastructure to more general
registers, instead of restricting it to VNCR-backed registers, since
commit a0162020095e ("KVM: arm64: Extend masking facility to arbitrary
registers"). Fix kvm_get_sysreg_res0() to reflect this fact.
Huh, what a howler! Thanks a lot for spotting this!
Note that we're sure that we only deal with FGT registers in
kvm_get_sysreg_res0(), the
if (sr < __VNCR_START__)
is actually a never false, which should probably be removed later.
I think the biggest mistake is to have several places where we perform
sysreg index to array index conversions. We should try to unify that.
Fixes: 69c19e047dfe ("KVM: arm64: Add TCR2_EL2 to the sysreg arrays")
Signed-off-by: Zenghui Yu (Huawei) <redacted>
Cc: stable@vger.kernel.org
Thanks again,
M.
--
Without deviation from the norm, progress is not possible.