RE: [PATCH v6 12/24] vfio/pci: Allow passing zero-length fd array in VFIO_DEVICE_PCI_HOT_RESET

Tian, Kevin
2023-03-10T09:13:14Z

> From: Liu, Yi L <yi.l.liu@intel.com>
> Sent: Friday, March 10, 2023 2:04 PM
> > > + *
> > > + * In the last case all affected devices which are opened by this user
> > > + * must have been bound to a same iommufd_ctx. This approach is only
> > > + * available for devices bound to positive iommufd.
> >
> > As we chatted before I still think the last sentence is pointless. If a device
> > is bound to negative iommufd value (i.e. noiommu) it doesn't have a
> > valid iommufd_ctx so won't meet "bound to a same iommufd_ctx".
>
> Yes, it is. But iommufd_ctx is more a kernel thing, userspace may just
> know whether it has bound a positive iommufd or a negative iommufd
> to the device. So positive iommufd may be more straightforward to
> userspace programmers. 😊 If it's really redundant, I can remove it
> as well.
>

s/iommufd_ctx/iommufd/.

negative value is not a fd. Just a uAPI format to mark noiommu.