KVM: arm64: Allow userspace to change ID_AA64PFR0_EL1
authorJing Zhang <jingzhangos@google.com>
Tue, 3 Oct 2023 23:04:04 +0000 (23:04 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 4 Oct 2023 17:11:50 +0000 (17:11 +0000)
commit8cfd5be88ebe3d71be1a2c52fc72a355bb924b49
tree6adda9e662ecd0d2fe626eef949bdc1a5535384f
parentd5a32b60dc184cc7309f83648a368b94d91c797f
KVM: arm64: Allow userspace to change ID_AA64PFR0_EL1

Allow userspace to change the guest-visible value of the register with
some severe limitation:

 - No changes to features not virtualized by KVM (AMU, MPAM, RAS)

 - Short of full GICv2 emulation in kernel, hiding GICv3 from the guest
   makes absolutely no sense.

 - FP is effectively assumed for KVM VMs.

Signed-off-by: Jing Zhang <jingzhangos@google.com>
[oliver: restrict features that are illogical to change]
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231003230408.3405722-9-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/sys_regs.c