diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2016-02-22 16:02:33 -0700 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-02-22 16:10:08 -0700 |
commit | d7a8d5ed876970ac7f9bafbb6708500a7838c1d7 (patch) | |
tree | 92a28cf94a2e0fab42579b4484d6e0e644e2aee7 /include/linux/vfio.h | |
parent | c84982adb23bcf3b99b79ca33527cd2625fbe279 (diff) |
vfio: Add capability chain helpers
Allow sub-modules to easily reallocate a buffer for managing
capability chains for info ioctls.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/linux/vfio.h')
-rw-r--r-- | include/linux/vfio.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/vfio.h b/include/linux/vfio.h index 610a86a892b8..0ecae0b1cd34 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h @@ -92,6 +92,17 @@ extern int vfio_external_user_iommu_id(struct vfio_group *group); extern long vfio_external_check_extension(struct vfio_group *group, unsigned long arg); +/* + * Sub-module helpers + */ +struct vfio_info_cap { + struct vfio_info_cap_header *buf; + size_t size; +}; +extern struct vfio_info_cap_header *vfio_info_cap_add( + struct vfio_info_cap *caps, size_t size, u16 id, u16 version); +extern void vfio_info_cap_shift(struct vfio_info_cap *caps, size_t offset); + struct pci_dev; #ifdef CONFIG_EEH extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev); |