The patchset is mainly for fixing errors from building VFIO compoments
as dynamic modules. PATCH[4/4] allows VFIO can be used though EEH fails
to initialize for VFIO PCI devices.
Alexey Kardashevskiy (2):
drivers/vfio: Allow EEH to be built as module
drivers/vfio: Enable VFIO if EEH is not supported
Gavin Shan (3):
powerpc/eeh: Export eeh_iommu_group_to_pe()
powerpc/eeh: Add warning message in eeh_dev_open()
drivers/vfio: Fix EEH build error
arch/powerpc/kernel/eeh.c | 6 +++++-
drivers/vfio/Kconfig | 6 ++++++
drivers/vfio/Makefile | 2 +-
drivers/vfio/pci/vfio_pci.c | 6 +-----
drivers/vfio/vfio_spapr_eeh.c | 17 +++++++++++++++--
include/linux/vfio.h | 6 +++---
6 files changed, 31 insertions(+), 12 deletions(-)
--=20
1.8.3.2
The patch adds one warning message in eeh_dev_open() in case the
PCI device can't be marked as passed through.
Suggested-by: Alexey Kardashevskiy <redacted>
Signed-off-by: Gavin Shan <redacted>
---
arch/powerpc/kernel/eeh.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -1162,8 +1162,11 @@ int eeh_dev_open(struct pci_dev *pdev)/* No EEH device or PE ? */edev=pci_dev_to_eeh_dev(pdev);-if(!edev||!edev->pe)+if(!edev||!edev->pe){+pr_warn_once("%s: PCI device %s not supported\n",+__func__,pci_name(pdev));gotoout;+}/* Increase PE's pass through count */atomic_inc(&edev->pe->pass_dev_cnt);
From: Alexey Kardashevskiy <redacted>
The existing vfio_pci_open() fails upon error returned from
vfio_spapr_pci_eeh_open(), which breaks POWER7's P5IOC2 PHB
support which this patch brings back.
The patch fixes the issue by dropping the return value of
vfio_spapr_pci_eeh_open().
Signed-off-by: Alexey Kardashevskiy <redacted>
Signed-off-by: Gavin Shan <redacted>
---
v3: Drop return value of vfio_spapr_pci_eeh_open()
v4: Add warning message in eeh_dev_open() in PATCH[2/5]
---
drivers/vfio/pci/vfio_pci.c | 6 +-----
drivers/vfio/vfio_spapr_eeh.c | 4 ++--
include/linux/vfio.h | 5 ++---
3 files changed, 5 insertions(+), 10 deletions(-)
@@ -19,9 +19,9 @@#define DRIVER_DESC "VFIO IOMMU SPAPR EEH"/* We might build address mapping here for "fast" path later */-intvfio_spapr_pci_eeh_open(structpci_dev*pdev)+voidvfio_spapr_pci_eeh_open(structpci_dev*pdev){-returneeh_dev_open(pdev);+eeh_dev_open(pdev);}EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_open);
The function is used by VFIO driver, which might be built as a
dynamic module. So it should be exported.
Signed-off-by: Gavin Shan <redacted>
---
arch/powerpc/kernel/eeh.c | 1 +
1 file changed, 1 insertion(+)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2014-08-08 03:55:23
On Thu, 2014-08-07 at 12:47 +1000, Gavin Shan wrote:
The patch adds one warning message in eeh_dev_open() in case the
PCI device can't be marked as passed through.
Suggested-by: Alexey Kardashevskiy <redacted>
Signed-off-by: Gavin Shan <redacted>
---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Alex, are you taking this or should I ?
@@ -1162,8 +1162,11 @@ int eeh_dev_open(struct pci_dev *pdev)/* No EEH device or PE ? */edev=pci_dev_to_eeh_dev(pdev);-if(!edev||!edev->pe)+if(!edev||!edev->pe){+pr_warn_once("%s: PCI device %s not supported\n",+__func__,pci_name(pdev));gotoout;+}/* Increase PE's pass through count */atomic_inc(&edev->pe->pass_dev_cnt);
From: Alex Williamson <hidden> Date: 2014-08-08 04:06:24
On Fri, 2014-08-08 at 13:50 +1000, Benjamin Herrenschmidt wrote:
On Thu, 2014-08-07 at 12:47 +1000, Gavin Shan wrote:
quoted
The patch adds one warning message in eeh_dev_open() in case the
PCI device can't be marked as passed through.
Suggested-by: Alexey Kardashevskiy <redacted>
Signed-off-by: Gavin Shan <redacted>
---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Alex, are you taking this or should I ?
You should take 1 & 2, AFAICT there's no dependencies between anything
in this series. Thanks,
Alex
@@ -1162,8 +1162,11 @@ int eeh_dev_open(struct pci_dev *pdev)/* No EEH device or PE ? */edev=pci_dev_to_eeh_dev(pdev);-if(!edev||!edev->pe)+if(!edev||!edev->pe){+pr_warn_once("%s: PCI device %s not supported\n",+__func__,pci_name(pdev));gotoout;+}/* Increase PE's pass through count */atomic_inc(&edev->pe->pass_dev_cnt);
From: Alex Williamson <hidden> Date: 2014-08-08 17:13:32
On Thu, 2014-08-07 at 12:47 +1000, Gavin Shan wrote:
The patchset is mainly for fixing errors from building VFIO compoments
as dynamic modules. PATCH[4/4] allows VFIO can be used though EEH fails
to initialize for VFIO PCI devices.
Alexey Kardashevskiy (2):
drivers/vfio: Allow EEH to be built as module
drivers/vfio: Enable VFIO if EEH is not supported
Gavin Shan (3):
powerpc/eeh: Export eeh_iommu_group_to_pe()
powerpc/eeh: Add warning message in eeh_dev_open()
drivers/vfio: Fix EEH build error
arch/powerpc/kernel/eeh.c | 6 +++++-
drivers/vfio/Kconfig | 6 ++++++
drivers/vfio/Makefile | 2 +-
drivers/vfio/pci/vfio_pci.c | 6 +-----
drivers/vfio/vfio_spapr_eeh.c | 17 +++++++++++++++--
include/linux/vfio.h | 6 +++---
6 files changed, 31 insertions(+), 12 deletions(-)
Applied 3-5 to vfio next branch for 3.17. Thanks,
Alex