On Fri, Aug 16, 2024 at 12:42:17PM -0700, Nicolin Chen wrote: > > > > > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h > > > index e131d8170b90..c4872af6232c 100644 > > > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h > > > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h > > > @@ -616,2 +616,3 @@ struct arm_smmu_cmdq { > > > atomic_t lock; > > > + bool (*supports_cmd)(struct arm_smmu_cmdq_ent *ent); > > > }; > > > > > > That being said, the whole thing doesn't seem to have a lot value > > > at this moment, since the SMMU driver doesn't mix commands? > > OK. I have added a patch for this. Let's just make things a bit > perfect at once. > Here is a v13 branch that addressed most of your remarks here: > https://github.com/nicolinc/iommufd/commits/vcmdq_in_kernel-v13 It seems reasonable to me, it is sort of going back to my original suggestion to pass in some kind of flag to say which commands were going to be in the batch. Since all batches are simple op code right now this seems good enough for today! Jason