aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/vfio.h
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2014-06-09 21:41:57 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-05 01:28:48 -0400
commit1b69be5e8afc634f39ad695a6ab6aad0cf0975c7 (patch)
treef87cc5eae17311b309c7498ce063eb33cc028fc3 /include/linux/vfio.h
parent212d16cdca2d0f7708c9c1d284a845c22bfc90c4 (diff)
drivers/vfio: EEH support for VFIO PCI device
The patch adds new IOCTL commands for sPAPR VFIO container device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Alexander Graf <agraf@suse.de> Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/linux/vfio.h')
-rw-r--r--include/linux/vfio.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 8ec980b5e3af..25a0fbd4b998 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -98,4 +98,27 @@ extern int vfio_external_user_iommu_id(struct vfio_group *group);
98extern long vfio_external_check_extension(struct vfio_group *group, 98extern long vfio_external_check_extension(struct vfio_group *group,
99 unsigned long arg); 99 unsigned long arg);
100 100
101#ifdef CONFIG_EEH
102extern int vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
103extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
104extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
105 unsigned int cmd,
106 unsigned long arg);
107#else
108static inline int vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
109{
110 return 0;
111}
112
113static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev)
114{
115}
116
117static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
118 unsigned int cmd,
119 unsigned long arg)
120{
121 return -ENOTTY;
122}
123#endif /* CONFIG_EEH */
101#endif /* VFIO_H */ 124#endif /* VFIO_H */