Commit 9e059fe0 authored by Oliver Upton's avatar Oliver Upton Committed by Treehugger Robot
Browse files

BACKPORT: KVM: arm64: Actually prevent SMC64 SYSTEM_RESET2 from AArch32



The SMCCC does not allow the SMC64 calling convention to be used from
AArch32. While KVM checks to see if the calling convention is allowed in
PSCI_1_0_FN_PSCI_FEATURES, it does not actually prevent calls to
unadvertised PSCI v1.0+ functions.

Hoist the check to see if the requested function is allowed into
kvm_psci_call(), thereby preventing SMC64 calls from AArch32 for all
PSCI versions.

Bug: 254441685
Fixes: d43583b8 ("KVM: arm64: Expose PSCI SYSTEM_RESET2 call to the guest")
Acked-by: default avatarWill Deacon <will@kernel.org>
Reviewed-by: default avatarReiji Watanabe <reijiw@google.com>
Signed-off-by: default avatarOliver Upton <oupton@google.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220322183538.2757758-3-oupton@google.com


(cherry picked from commit 827c2ab3)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I0f2909827c481850014d6bdab321ff107d59196d
parent c6408580
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment