diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 19:41:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 19:41:58 -0800 |
commit | 1984f65c2fbc0d2b557d6e89ece9b39267e215c6 (patch) | |
tree | cfaec61ef718812e0ba4c06cb8c3338af71fe1f7 /drivers/vfio/pci/vfio_pci_private.h | |
parent | f346b0becb1bc62e45495f9cdbae3eef35d0b635 (diff) | |
parent | 8ba35b3a0046d6573c98f00461d9bd1b86250d35 (diff) |
Merge tag 'vfio-v4.21-rc1' of git://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson:
- Replace global vfio-pci lock with per bus lock to allow concurrent
open and release (Alex Williamson)
- Declare mdev function as static (Paolo Cretaro)
- Convert char to u8 in mdev/mtty sample driver (Nathan Chancellor)
* tag 'vfio-v4.21-rc1' of git://github.com/awilliam/linux-vfio:
vfio-mdev/samples: Use u8 instead of char for handle functions
vfio/mdev: add static modifier to add_mdev_supported_type
vfio/pci: Parallelize device open and release
Diffstat (limited to 'drivers/vfio/pci/vfio_pci_private.h')
-rw-r--r-- | drivers/vfio/pci/vfio_pci_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/vfio/pci/vfio_pci_private.h b/drivers/vfio/pci/vfio_pci_private.h index 127071b84dd7..8c0009f00818 100644 --- a/drivers/vfio/pci/vfio_pci_private.h +++ b/drivers/vfio/pci/vfio_pci_private.h @@ -82,6 +82,11 @@ struct vfio_pci_dummy_resource { struct list_head res_next; }; +struct vfio_pci_reflck { + struct kref kref; + struct mutex lock; +}; + struct vfio_pci_device { struct pci_dev *pdev; void __iomem *barmap[PCI_STD_RESOURCE_END + 1]; @@ -110,6 +115,7 @@ struct vfio_pci_device { bool needs_reset; bool nointx; struct pci_saved_state *pci_saved_state; + struct vfio_pci_reflck *reflck; int refcnt; int ioeventfds_nr; struct eventfd_ctx *err_trigger; |