KVM: arm64: Make ID_AA64PFR1_EL1.RAS_frac writable
authorMarc Zyngier <maz@kernel.org>
Sun, 17 Aug 2025 20:21:57 +0000 (21:21 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 21 Aug 2025 23:31:56 +0000 (16:31 -0700)
commit7a765aa88e345782d3e4ed4c82e49f1ea82fd29c
treeba695831be9fcac3f181f0adef05f7a471ee5ed5
parent1fab657cb2a07889c343302fbebca035e702683e
KVM: arm64: Make ID_AA64PFR1_EL1.RAS_frac writable

Allow userspace to write to RAS_frac, under the condition that
the host supports RASv1p1 with RAS_frac==1. Other configurations
will result in RAS_frac being exposed as 0, and therefore implicitly
not writable.

To avoid the clutter, the ID_AA64PFR1_EL1 sanitisation is moved to
its own function.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Link: https://lore.kernel.org/r/20250817202158.395078-6-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/sys_regs.c