[PATCH v6 05/14] iommufd: Add IOMMUFD_OBJ_VEVENTQ and IOMMUFD_CMD_VEVENTQ_ALLOC

Nicolin Chen nicolinc at nvidia.com
Tue Feb 18 10:15:45 PST 2025


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



More information about the linux-arm-kernel mailing list