Re: [PATCH v1 2/8] firmware: arm_rmm: Add VSMMU commands and fields

From: Jason Gunthorpe

Date: Wed Oct 28 2026 - 08:35:55 EST


On Wed, Oct 28, 2026 at 09:49:53AM +0000, Shameer Kolothum Thodi wrote:
> > +static inline unsigned long rsi_arch_dev_activate(phys_addr_t base,
> > + unsigned long dev_type)
> > +{
> > + struct arm_smccc_res res;
> > +
> > + arm_smccc_1_1_invoke(SMC_RSI_ARCH_DEV_ACTIVATE, base,
> > dev_type, &res);
>
> These calls leave unused input registers unspecified, whereas
> DEN0137 bet3 B1.2 marks them SBZ. Could we explicitly zero them?
>
> "On calling an RMI or RSI command, any of X1- X16 which are not
> specified as input values in the command definition SBZ"

That seems too broad, Linux doesn't even support the x8-x16 inputs in
the macros. I think the spec has errd here.

Requiring zeroing of x0-x7 is sort of reasonable. Any future use of
x8-x16 (including outputs) should require a direct opt in of the OS to
indicate it supports this bank of registers.

Otherwise you probably need a new macro helper for this protocol..

Jason