On Mon, 8 May 2023 15:32:44 +0000 "Liu, Yi L" <yi.l.liu@xxxxxxxxx> wrote: > > From: Alex Williamson <alex.williamson@xxxxxxxxxx> > > Sent: Friday, April 28, 2023 4:16 AM > > > > > > + * > > > > * Return: 0 on success, -errno on failure: > > > > * -enospc = insufficient buffer, -enodev = unsupported for device. > > > > */ > > > > struct vfio_pci_dependent_device { > > > > - __u32 group_id; > > > > + union { > > > > + __u32 group_id; > > > > + __u32 dev_id; > > > > +#define VFIO_PCI_DEVID_NONBLOCKING 0 > > > > +#define VFIO_PCI_DEVID_BLOCKING -1 > > > > > > The above description seems like it's leaning towards OWNED rather than > > > BLOCKING. > > > > Also these should be defined relative to something defined in IOMMUFD > > rather than inventing values here. We can't have the valid devid > > number space owned by IOMMUFD conflict with these definitions. Thanks, > > Jason has proposed to reserve all negative IDs and 0 in iommufd. In that case, > can vfio define the numbers now? Ok, as long as it's guaranteed that we're overlapping invalid dev-ids, as specified by IOMMUFD, then the mapping of specific invalid dev-ids to error values here is interface specific and can be defined here. Thanks, Alex