]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Generally disallow SMC64 for AArch32 guests
authorOliver Upton <oupton@google.com>
Tue, 22 Mar 2022 18:35:36 +0000 (18:35 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 6 Apr 2022 09:39:39 +0000 (10:39 +0100)
commit9e5ce94043609bc3da30d3d3a5b923c0b7ea1636
tree5085b3fe5539474f2dd4a94521d3dcdd4b1da71a
parent6d94017b7b59bab528be97be158d0d602982e3a6
KVM: arm64: Generally disallow SMC64 for AArch32 guests

The only valid calling SMC calling convention from an AArch32 state is
SMC32. Disallow any PSCI function that sets the SMC64 function ID bit
when called from AArch32 rather than comparing against known SMC64 PSCI
functions.

Note that without this change KVM advertises the SMC64 flavor of
SYSTEM_RESET2 to AArch32 guests.

Fixes: df3e5c4932bd ("KVM: arm64: Expose PSCI SYSTEM_RESET2 call to the guest")
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220322183538.2757758-2-oupton@google.com
arch/arm64/kvm/psci.c