Re: [PATCH v10 6/7] firmware: smccc: arm-cca-guest: Bind the TSM provider to an SMCCC device

From: Jason Gunthorpe

Date: Wed Sep 09 2026 - 08:27:35 EST


On Wed, Sep 09, 2026 at 01:07:18PM +0530, Aneesh Kumar K.V wrote:

> > Could this also leak kernel register state to EL2?
> >
>
> Should we instead do
>
> arm_smccc_1_1_invoke(smccc_dev->func_id,
> 0, 0, 0, 0, 0, 0, 0, &res);
> ret = res.a0;
>
> There is no standard defining how the various SMCCC VERSION calls are
> expected to work. For example, ARM_SMCCC_TRNG_VERSION does not use x1,
> while SMC_RSI_ABI_VERSION does. Another VERSION call could use both x1
> and x2. The only consistent behavior is to return
> SMCCC_RET_NOT_SUPPORTED when the SMCCC function ID is not supported.

That seems safer to me at least. I'm less worried about "garbage"
leaking out but it maybe could cause something weird to happen in the
FW.. It might get confused and return the wrong error code and not get
discovered.

Jason