]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Handle protected guests at 32 bits
authorFuad Tabba <tabba@google.com>
Sun, 10 Oct 2021 14:56:36 +0000 (15:56 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 11 Oct 2021 13:57:30 +0000 (14:57 +0100)
commit490d1b6781e11417c2b930103b5982a0ef27d9ba
tree0c5457c13c68cbc0fa3332bf1103973716b6ad43
parentc94e548ecd7410b06c5068fdafe9701abedb5c7f
KVM: arm64: Handle protected guests at 32 bits

Protected KVM does not support protected AArch32 guests. However,
it is possible for the guest to force run AArch32, potentially
causing problems. Add an extra check so that if the hypervisor
catches the guest doing that, it can prevent the guest from
running again by resetting vcpu->arch.target and returning
ARM_EXCEPTION_IL.

If this were to happen, The VMM can try and fix it by re-
initializing the vcpu with KVM_ARM_VCPU_INIT, however, this is
likely not possible for protected VMs.

Adapted from commit 5518fa41216c ("KVM: arm64: Handle Asymmetric
AArch32 systems")

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-12-tabba@google.com
arch/arm64/kvm/hyp/nvhe/switch.c