On Tue, Feb 18, 2025 at 02:08:05PM -0400, Jason Gunthorpe wrote: > On Tue, Feb 18, 2025 at 09:47:50AM -0800, Nicolin Chen wrote: > > > > +int iommufd_veventq_alloc(struct iommufd_ucmd *ucmd) > > > > +{ > > > > + struct iommu_veventq_alloc *cmd = ucmd->cmd; > > > > + struct iommufd_veventq *veventq; > > > > + struct iommufd_viommu *viommu; > > > > + int fdno; > > > > + int rc; > > > > + > > > > + if (cmd->flags || cmd->type == IOMMU_VEVENTQ_TYPE_DEFAULT) > > > > + return -EOPNOTSUPP; > > > > + if (!cmd->veventq_depth) > > > > + return -EINVAL; > > > > > > Check __reserved for 0 too > > > > Kevin is suggesting a 32-bit flag field, so I think we can drop > > the __reserved in that case. > > Those are different structs? Oops. Right. I will check the __reserved. Thanks Nicolin