diff options
| -rw-r--r-- | drivers/vfio/Kconfig | 6 | ||||
| -rw-r--r-- | drivers/vfio/Makefile | 2 | ||||
| -rw-r--r-- | drivers/vfio/vfio_spapr_eeh.c | 3 | ||||
| -rw-r--r-- | include/linux/vfio.h | 1 |
4 files changed, 11 insertions, 1 deletions
diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig index af7b204b9215..d8c57636b9ce 100644 --- a/drivers/vfio/Kconfig +++ b/drivers/vfio/Kconfig | |||
| @@ -8,11 +8,17 @@ config VFIO_IOMMU_SPAPR_TCE | |||
| 8 | depends on VFIO && SPAPR_TCE_IOMMU | 8 | depends on VFIO && SPAPR_TCE_IOMMU |
| 9 | default n | 9 | default n |
| 10 | 10 | ||
| 11 | config VFIO_SPAPR_EEH | ||
| 12 | tristate | ||
| 13 | depends on EEH && VFIO_IOMMU_SPAPR_TCE | ||
| 14 | default n | ||
| 15 | |||
| 11 | menuconfig VFIO | 16 | menuconfig VFIO |
| 12 | tristate "VFIO Non-Privileged userspace driver framework" | 17 | tristate "VFIO Non-Privileged userspace driver framework" |
| 13 | depends on IOMMU_API | 18 | depends on IOMMU_API |
| 14 | select VFIO_IOMMU_TYPE1 if X86 | 19 | select VFIO_IOMMU_TYPE1 if X86 |
| 15 | select VFIO_IOMMU_SPAPR_TCE if (PPC_POWERNV || PPC_PSERIES) | 20 | select VFIO_IOMMU_SPAPR_TCE if (PPC_POWERNV || PPC_PSERIES) |
| 21 | select VFIO_SPAPR_EEH if (PPC_POWERNV || PPC_PSERIES) | ||
| 16 | select ANON_INODES | 22 | select ANON_INODES |
| 17 | help | 23 | help |
| 18 | VFIO provides a framework for secure userspace device drivers. | 24 | VFIO provides a framework for secure userspace device drivers. |
diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile index 50e30bc75e85..0b035b12600a 100644 --- a/drivers/vfio/Makefile +++ b/drivers/vfio/Makefile | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | obj-$(CONFIG_VFIO) += vfio.o | 1 | obj-$(CONFIG_VFIO) += vfio.o |
| 2 | obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o | 2 | obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o |
| 3 | obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o | 3 | obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o |
| 4 | obj-$(CONFIG_EEH) += vfio_spapr_eeh.o | 4 | obj-$(CONFIG_VFIO_SPAPR_EEH) += vfio_spapr_eeh.o |
| 5 | obj-$(CONFIG_VFIO_PCI) += pci/ | 5 | obj-$(CONFIG_VFIO_PCI) += pci/ |
diff --git a/drivers/vfio/vfio_spapr_eeh.c b/drivers/vfio/vfio_spapr_eeh.c index f834b4ce1431..949f98e997af 100644 --- a/drivers/vfio/vfio_spapr_eeh.c +++ b/drivers/vfio/vfio_spapr_eeh.c | |||
| @@ -18,11 +18,13 @@ int vfio_spapr_pci_eeh_open(struct pci_dev *pdev) | |||
| 18 | { | 18 | { |
| 19 | return eeh_dev_open(pdev); | 19 | return eeh_dev_open(pdev); |
| 20 | } | 20 | } |
| 21 | EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_open); | ||
| 21 | 22 | ||
| 22 | void vfio_spapr_pci_eeh_release(struct pci_dev *pdev) | 23 | void vfio_spapr_pci_eeh_release(struct pci_dev *pdev) |
| 23 | { | 24 | { |
| 24 | eeh_dev_release(pdev); | 25 | eeh_dev_release(pdev); |
| 25 | } | 26 | } |
| 27 | EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_release); | ||
| 26 | 28 | ||
| 27 | long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, | 29 | long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, |
| 28 | unsigned int cmd, unsigned long arg) | 30 | unsigned int cmd, unsigned long arg) |
| @@ -85,3 +87,4 @@ long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, | |||
| 85 | 87 | ||
| 86 | return ret; | 88 | return ret; |
| 87 | } | 89 | } |
| 90 | EXPORT_SYMBOL(vfio_spapr_iommu_eeh_ioctl); | ||
diff --git a/include/linux/vfio.h b/include/linux/vfio.h index 25a0fbd4b998..224128a96b7f 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h | |||
| @@ -98,6 +98,7 @@ extern int vfio_external_user_iommu_id(struct vfio_group *group); | |||
| 98 | extern long vfio_external_check_extension(struct vfio_group *group, | 98 | extern long vfio_external_check_extension(struct vfio_group *group, |
| 99 | unsigned long arg); | 99 | unsigned long arg); |
| 100 | 100 | ||
| 101 | struct pci_dev; | ||
| 101 | #ifdef CONFIG_EEH | 102 | #ifdef CONFIG_EEH |
| 102 | extern int vfio_spapr_pci_eeh_open(struct pci_dev *pdev); | 103 | extern int vfio_spapr_pci_eeh_open(struct pci_dev *pdev); |
| 103 | extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev); | 104 | extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev); |
