All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Remove vfio_device_get_from_dev()
@ 2022-05-04 19:01 Jason Gunthorpe
  2022-05-04 19:01 ` [PATCH v3 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; 11+ messages in thread
From: Jason Gunthorpe @ 2022-05-04 19:01 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.

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@nvidia.com

Cc: Abhishek Sahu <abhsahu@nvidia.com>
Signed-off-by: Jason Gunthorpe <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    | 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


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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 19:01 [PATCH v3 0/2] Remove vfio_device_get_from_dev() Jason Gunthorpe
2022-05-04 19:01 ` [PATCH v3 1/2] vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in drvdata Jason Gunthorpe
2022-05-05 18:10   ` Alex Williamson
2022-05-05 18:34     ` Jason Gunthorpe
2022-05-05 18:54       ` Alex Williamson
2022-05-05 19:28         ` Jason Gunthorpe
2022-05-04 19:01 ` [PATCH v3 2/2] vfio/pci: Remove vfio_device_get_from_dev() Jason Gunthorpe
2022-05-04 20:20   ` Kirti Wankhede
2022-05-04 21:36     ` Jason Gunthorpe
2022-05-06 21:08     ` Alex Williamson
2022-05-04 19:30 ` [PATCH v3 0/2] " Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.