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>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
212d16cdca
commit
1b69be5e8a
@@ -98,4 +98,27 @@ extern int vfio_external_user_iommu_id(struct vfio_group *group);
|
||||
extern long vfio_external_check_extension(struct vfio_group *group,
|
||||
unsigned long arg);
|
||||
|
||||
#ifdef CONFIG_EEH
|
||||
extern int vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
|
||||
extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
|
||||
extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
|
||||
unsigned int cmd,
|
||||
unsigned long arg);
|
||||
#else
|
||||
static inline int vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
|
||||
unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
return -ENOTTY;
|
||||
}
|
||||
#endif /* CONFIG_EEH */
|
||||
#endif /* VFIO_H */
|
||||
|
Reference in New Issue
Block a user