public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Remove vfio_device_get_from_dev()
@ 2022-05-05 23:21 Jason Gunthorpe
  2022-05-05 23:21 ` [PATCH v4 1/2] vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in drvdata Jason Gunthorpe
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2022-05-05 23:21 UTC (permalink / raw)
  To: Alex Williamson, Cornelia Huck, Kevin Tian, kvm, Longfang Liu,
	Shameer Kolothum, Yishai Hadas
  Cc: Abhishek Sahu, Kirti Wankhede

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.

v4:
 - Put back missing rebase hunk for vfio_group_get_from_dev()
 - Move the WARN_ON to vfio_pci_core_register_device() and move the
   dev_set_drvdata() to match
v3: https://lore.kernel.org/r/0-v3-4adf6c1b8e7c+170-vfio_get_from_dev_jgg@nvidia.com
 - 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.
v2: https://lore.kernel.org/r/0-v2-0f36bcf6ec1e+64d-vfio_get_from_dev_jgg@nvidia.com
 - Rebase on the vfio_mdev_no_group branch
 - Delete vfio_group_get_from_dev() as well due to the rebase
v1: https://lore.kernel.org/r/0-v1-7f2292e6b2ba+44839-vfio_get_from_dev_jgg@nvidia.com

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    | 15 +++++--
 drivers/vfio/pci/mlx5/main.c                  | 15 +++++--
 drivers/vfio/pci/vfio_pci.c                   |  6 ++-
 drivers/vfio/pci/vfio_pci_core.c              | 36 +++++-----------
 drivers/vfio/vfio.c                           | 41 +------------------
 include/linux/vfio.h                          |  2 -
 include/linux/vfio_pci_core.h                 |  3 +-
 7 files changed, 39 insertions(+), 79 deletions(-)


base-commit: 21ce7c292b5684f930cc63f3841ec692bbd6c10a
-- 
2.36.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-12 18:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-05 23:21 [PATCH v4 0/2] Remove vfio_device_get_from_dev() Jason Gunthorpe
2022-05-05 23:21 ` [PATCH v4 1/2] vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in drvdata Jason Gunthorpe
2022-05-06 15:42   ` Alex Williamson
2022-05-06 17:57     ` Jason Gunthorpe
2022-05-09  6:35   ` Abhishek Sahu
2022-05-05 23:21 ` [PATCH v4 2/2] vfio/pci: Remove vfio_device_get_from_dev() Jason Gunthorpe
2022-05-12 18:21 ` [PATCH v4 0/2] " Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox