KVM: arm64: Mark HCR.EL2.{NV*,AT} RES0 when ID_AA64MMFR4_EL1.NV_frac is 0
authorMarc Zyngier <maz@kernel.org>
Thu, 20 Feb 2025 13:48:57 +0000 (13:48 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 24 Feb 2025 19:06:55 +0000 (11:06 -0800)
commit8f8d6084f5b5df7e29b58ff17b6c735fb349b1a9
tree63d6b722d9934c7fc02d6d841893f8dc21f49d31
parentd9f943f76506f60b9b74ce04caead6ce81b12fe0
KVM: arm64: Mark HCR.EL2.{NV*,AT} RES0 when ID_AA64MMFR4_EL1.NV_frac is 0

Enforce HCR_EL2.{NV*,AT} being RES0 when NV2 is disabled, so that
we can actually rely on these bits never being flipped behind our back.

This of course relies on our earlier ID reg sanitising.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/20250220134907.554085-5-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/nested.c