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 (2):
powerpc/eeh: Export eeh_iommu_group_to_pe()
drivers/vfio: Fix EEH build error
arch/powerpc/kernel/eeh.c | 1 +
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, 27 insertions(+), 11 deletions(-)
--=20
1.8.3.2
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()
---
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: Alex Williamson <hidden> Date: 2014-08-06 12:50:48
On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote:
quoted hunk
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()
---
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);
Wasn't there some intent to provide a warning message, that would now be
done here? Has that idea been dropped?
On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote:
quoted
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()
---
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);
Wasn't there some intent to provide a warning message, that would now be
done here? Has that idea been dropped?
Comrade Gavin just forgot it :)
Gavin, please add it. Thanks!
On Wed, Aug 06, 2014 at 11:05:43PM +1000, Alexey Kardashevskiy wrote:
On 08/06/2014 10:50 PM, Alex Williamson wrote:
quoted
On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote:
quoted
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()
---
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);
Wasn't there some intent to provide a warning message, that would now be
done here? Has that idea been dropped?
Comrade Gavin just forgot it :)
Gavin, please add it. Thanks!
Sure, I'll add following warning message in eeh_dev_open() in
separate patch in v4 in case nobody objects.
int eeh_dev_open(struct pci_dev *pdev)
{
:
/* No EEH device or PE ? */
edev = pci_dev_to_eeh_dev(pdev);
if (!edev || !edev->pe) {
pr_warn_once("%s: Device %s not supported\n",
__func__, pci_name(pdev));
goto out;
}
:
}
Thanks,
Gavin
On Thu, Aug 07, 2014 at 12:10:07PM +1000, Gavin Shan wrote:
On Wed, Aug 06, 2014 at 11:05:43PM +1000, Alexey Kardashevskiy wrote:
quoted
On 08/06/2014 10:50 PM, Alex Williamson wrote:
quoted
On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote:
quoted
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()
---
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);
Wasn't there some intent to provide a warning message, that would now be
done here? Has that idea been dropped?
Comrade Gavin just forgot it :)
Gavin, please add it. Thanks!
Sure, I'll add following warning message in eeh_dev_open() in
separate patch in v4 in case nobody objects.
int eeh_dev_open(struct pci_dev *pdev)
{
:
/* No EEH device or PE ? */
edev = pci_dev_to_eeh_dev(pdev);
if (!edev || !edev->pe) {
pr_warn_once("%s: Device %s not supported\n",
__func__, pci_name(pdev));
goto out;
}
:
}
Well, I added the warning message in eeh_dev_open() and sending "v4" out.
Thanks,
Gavin