Re: [PATCH] KVM: arm64: Pass a 64bit function-id in the SMC handlers
From: Marc Zyngier
Date: Wed Apr 01 2026 - 11:13:01 EST
On Wed, 01 Apr 2026 13:32:01 +0100,
Sebastian Ene <sebastianene@xxxxxxxxxx> wrote:
>
> Make the SMC handlers accept a 64bit value for the function-id to keep
> it uniform with the rest of the code and prevent a u64 -> u32 -> u64
> conversion as it currently happens when we handle PSCI.
That seems overly creative. The spec says (2.5, from ARM DEN 0028 1.6
G):
"The Function Identifier is passed on W0 on every SMC and HVC
call. Its 32-bit integer value indicates which function is being
requested by the caller. It is always passed as the first argument to
every SMC or HVC call in R0 or W0."
which indicates that it is *always* a 32bit value.
So if you have a 64bit value somewhere, *that* should be fixed, not
propagated arbitrarily.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.