[Intel-gfx] [PATCH v7 7/9] vfio: Add helper to search vfio_device in a dev_set
Jason Gunthorpe
jgg at nvidia.com
Tue Jun 13 11:47:51 UTC 2023
On Fri, Jun 02, 2023 at 05:15:13AM -0700, Yi Liu wrote:
> There are drivers that need to search vfio_device within a given dev_set.
> e.g. vfio-pci. So add a helper.
>
> vfio_pci_is_device_in_set() now returns -EBUSY in commit a882c16a2b7e
> ("vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set") where
> it was trying to preserve the return of vfio_pci_try_zap_and_vma_lock_cb().
> However, it makes more sense to return -ENODEV.
>
> Suggested-by: Alex Williamson <alex.williamson at redhat.com>
> Tested-by: Terrence Xu <terrence.xu at intel.com>
> Signed-off-by: Yi Liu <yi.l.liu at intel.com>
> ---
> drivers/vfio/pci/vfio_pci_core.c | 6 +-----
> drivers/vfio/vfio_main.c | 15 +++++++++++++++
> include/linux/vfio.h | 3 +++
> 3 files changed, 19 insertions(+), 5 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
Jason
More information about the Intel-gfx
mailing list