]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: nv: Don't erroneously claim FEAT_DoubleLock for NV VMs
authorOliver Upton <oliver.upton@linux.dev>
Fri, 12 Sep 2025 21:22:49 +0000 (14:22 -0700)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Sep 2025 13:01:35 +0000 (14:01 +0100)
commit49da9872a6a6fa943c02448eeae6db5e7f479283
tree1729eede6196d83464452b8f0954a680eb8bb129
parentd3c35b7c57fc33ce787921e2faf84b7d58989a2a
KVM: arm64: nv: Don't erroneously claim FEAT_DoubleLock for NV VMs

ID_AA64DFR0_EL1.DoubleLock is one of those annoying signed feature
fields where a non-negative value implies that a feature is implemented
and a negative value implies that it is not. While the intention of
masking this field was likely to hide the feature, KVM actually
advertises it, even on unsupporting hardware.

Remove FEAT_DoubleLock from the mask, making the NI value visible to the
VM. Take care to accept the old, incorrect values for this field as
we've lied to userspace.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/nested.c
arch/arm64/kvm/sys_regs.c