]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: arm64: Reject 32bit user PSTATE on asymmetric systems
authorOliver Upton <oliver.upton@linux.dev>
Tue, 16 Aug 2022 19:25:54 +0000 (19:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:45:38 +0000 (11:45 +0200)
commit62ef55aa4381c8adbd2b8364bfd1f76e02dfa4d0
treed11a26dbd189750716c8b46c174c0db70912fc2f
parente4a36b051ca714a38ff45628b10de0b0558f2845
KVM: arm64: Reject 32bit user PSTATE on asymmetric systems

[ Upstream commit b10d86fb8e46cc812171728bcd326df2f34e9ed5 ]

KVM does not support AArch32 EL0 on asymmetric systems. To that end,
prevent userspace from configuring a vCPU in such a state through
setting PSTATE.

It is already ABI that KVM rejects such a write on a system where
AArch32 EL0 is unsupported. Though the kernel's definition of a 32bit
system changed in commit 2122a833316f ("arm64: Allow mismatched
32-bit EL0 support"), KVM's did not.

Fixes: 2122a833316f ("arm64: Allow mismatched 32-bit EL0 support")
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220816192554.1455559-3-oliver.upton@linux.dev
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kvm/guest.c