[PATCH] KVM: arm64: Pass a 64bit function-id in the SMC handlers

Marc Zyngier maz at kernel.org
Wed Apr 1 07:55:11 PDT 2026


On Wed, 01 Apr 2026 13:32:01 +0100,
Sebastian Ene <sebastianene at google.com> 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.



More information about the linux-arm-kernel mailing list