summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/pci/vfio_pci_private.h
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@nvidia.com>2021-08-05 22:19:04 -0300
committerAlex Williamson <alex.williamson@redhat.com>2021-08-11 09:50:11 -0600
commit2cd8b14aaa667f5c6b7918e8d769872fa9acb0ac (patch)
tree7b6108c83c920bcf187d1ea6eed9b0747673f6f8 /drivers/vfio/pci/vfio_pci_private.h
parentab7e5e34a9f661f5649f48d4531c4a75713ff7cf (diff)
downloadlinux-2cd8b14aaa667f5c6b7918e8d769872fa9acb0ac.tar.bz2
vfio/pci: Move to the device set infrastructure
PCI wants to have the usual open/close_device() logic with the slight twist that the open/close_device() must be done under a singelton lock shared by all of the vfio_devices that are in the PCI "reset group". The reset group, and thus the device set, is determined by what devices pci_reset_bus() touches, which is either the entire bus or only the slot. Rely on the core code to do everything reflck was doing and delete reflck entirely. Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Link: https://lore.kernel.org/r/8-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci/vfio_pci_private.h')
-rw-r--r--drivers/vfio/pci/vfio_pci_private.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/vfio/pci/vfio_pci_private.h b/drivers/vfio/pci/vfio_pci_private.h
index bbc56c857ef0..70414b6c904d 100644
--- a/drivers/vfio/pci/vfio_pci_private.h
+++ b/drivers/vfio/pci/vfio_pci_private.h
@@ -83,11 +83,6 @@ struct vfio_pci_dummy_resource {
struct list_head res_next;
};
-struct vfio_pci_reflck {
- struct kref kref;
- struct mutex lock;
-};
-
struct vfio_pci_vf_token {
struct mutex lock;
uuid_t uuid;
@@ -130,8 +125,6 @@ struct vfio_pci_device {
bool needs_pm_restore;
struct pci_saved_state *pci_saved_state;
struct pci_saved_state *pm_save;
- struct vfio_pci_reflck *reflck;
- int refcnt;
int ioeventfds_nr;
struct eventfd_ctx *err_trigger;
struct eventfd_ctx *req_trigger;