KVM: arm64: Return NOT_SUPPORTED to guest for unknown PSCI version
authorOliver Upton <oliver.upton@linux.dev>
Tue, 4 Apr 2023 15:40:47 +0000 (15:40 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 5 Apr 2023 11:07:41 +0000 (12:07 +0100)
commit7e484d2785e2a2e526a6b2679d3e4c1402ffe0ec
tree01a86b0b716e2427a09d8f23f21c8ad9b76bceaf
parent821d935c87bc95253f82deec3cbb457ccf3de003
KVM: arm64: Return NOT_SUPPORTED to guest for unknown PSCI version

A subsequent change to KVM will allow negative returns from SMCCC
handlers to exit to userspace. Make way for this change by explicitly
returning SMCCC_RET_NOT_SUPPORTED to the guest if the VM is configured
to use an unknown PSCI version. Add a WARN since this is undoubtedly a
KVM bug.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230404154050.2270077-11-oliver.upton@linux.dev
arch/arm64/kvm/psci.c