On Mon, Sep 08, 2025 at 02:59:55AM -0700, Shameer Kolothum wrote: > > -----Original Message----- > > From: Eric Auger <eric.au...@redhat.com> > > > +/* > > > + * SMMUCommandBatch - batch of invalidation commands for accel > > smmuv3 > > > + * @cmds: Pointer to list of commands > > > + * @cons: Pointer to list of CONS corresponding to the commands > > It is not totally clear to me how the list of "CONS" indexes is used. Is > > it meant to store errors, how do you update cons index in case it starts > > failing, ... > > This is how I understand it, > > The cons here is to store SMMUv3 queue cons corresponding to the cmd. And > in case batched invalidation fails(iommufd_backend_invalidate_cache()), it > will > update the batch->ncmds with the index of the last failed command. The cons > value at that index is then used to update the SMMUv3 cons index.
Yes. It is used to update the CONS index to the vSMMU CMDQ. Nicolin