[PATCH v3 0/2] Remove vfio_device_get_from_dev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use drvdata instead of searching to find the struct vfio_device for the
pci_driver callbacks.

This applies on top of the gvt series and at least rc3 - there are no
conflicts with the mdev vfio_group series, or the iommu series.

v2:
 - Directly access the drvdata from vfio_pci_core by making drvdata always
   point to the core struct. This will help later patches adding PM
   callbacks as well.
v1: https://lore.kernel.org/r/0-v2-0f36bcf6ec1e+64d-vfio_get_from_dev_jgg@xxxxxxxxxx

Cc: Abhishek Sahu <abhsahu@xxxxxxxxxx>
Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason Gunthorpe (2):
  vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in
    drvdata
  vfio/pci: Remove vfio_device_get_from_dev()

 .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c    | 14 ++++++--
 drivers/vfio/pci/mlx5/main.c                  | 14 ++++++--
 drivers/vfio/pci/vfio_pci.c                   |  4 ++-
 drivers/vfio/pci/vfio_pci_core.c              | 36 ++++++-------------
 drivers/vfio/vfio.c                           | 26 +-------------
 include/linux/vfio.h                          |  2 --
 include/linux/vfio_pci_core.h                 |  3 +-
 7 files changed, 38 insertions(+), 61 deletions(-)


base-commit: 758f579843974e9603191d2d77589af98001e3b3
-- 
2.36.0




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux