]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Hide S1PIE registers from userspace when disabled for guests
authorMark Brown <broonie@kernel.org>
Wed, 23 Oct 2024 14:53:33 +0000 (15:53 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 31 Oct 2024 02:44:21 +0000 (02:44 +0000)
commita68cddbe47efdac10855e5f154cbd6c87b792ba2
treec50e8e1edd2351af0e91d4e330fe14c4249112d8
parent0fcb4eea5345531118ca6f46391e88b12fbc35e4
KVM: arm64: Hide S1PIE registers from userspace when disabled for guests

When the guest does not support S1PIE we should not allow any access
to the system registers it adds in order to ensure that we do not create
spurious issues with guest migration. Add a visibility operation for these
registers.

Fixes: 86f9de9db178 ("KVM: arm64: Save/restore PIE registers")
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240822-kvm-arm64-hide-pie-regs-v2-3-376624fa829c@kernel.org
[maz: simplify by using __el2_visibility(), kvm_has_s1pie() throughout]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241023145345.1613824-26-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/at.c
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h
arch/arm64/kvm/nested.c
arch/arm64/kvm/sys_regs.c