KVM: arm64: nv: Allow userspace to set PSR_MODE_EL2x
authorChristoffer Dall <christoffer.dall@linaro.org>
Thu, 9 Feb 2023 17:58:07 +0000 (17:58 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Sat, 11 Feb 2023 09:16:11 +0000 (09:16 +0000)
commit1d05d51bac78428764664e8f841ac52ee87f24db
tree0871f02a10c798a635c4bb066eda5a0d86acc382
parent2fb32357ae672fa1cb63e046ba387963687300b0
KVM: arm64: nv: Allow userspace to set PSR_MODE_EL2x

We were not allowing userspace to set a more privileged mode for the VCPU
than EL1, but we should allow this when nested virtualization is enabled
for the VCPU.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230209175820.1939006-6-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/guest.c