[PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported
The existing vfio_pci_open() fails if there is no EEH support for PCI. This breaks POWER7's P5IOC2 PHB support which this patch brings back. It is a warning because this should not normally happen on supported configurations such as POWER8+IODA so we always want to see it in dmesg. It is _once() as the message may be triggered by non-privileged userspace and we do not want to pollute dmesg. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v2: * discussed with Ben Herrenschmidt and did s/pr_warn/pr_warn_once/ * updated commit log --- drivers/vfio/pci/vfio_pci.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index e2ee80f..68dc8da 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -179,10 +179,8 @@ static int vfio_pci_open(void *device_data) goto error; ret = vfio_spapr_pci_eeh_open(vdev-pdev); - if (ret) { - vfio_pci_disable(vdev); - goto error; - } + if (ret) + pr_warn_once(EEH is not supported\n); } return 0; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported
On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: The existing vfio_pci_open() fails if there is no EEH support for PCI. This breaks POWER7's P5IOC2 PHB support which this patch brings back. It is a warning because this should not normally happen on supported configurations such as POWER8+IODA so we always want to see it in dmesg. It is _once() as the message may be triggered by non-privileged userspace and we do not want to pollute dmesg. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- Changes: v2: * discussed with Ben Herrenschmidt and did s/pr_warn/pr_warn_once/ * updated commit log --- drivers/vfio/pci/vfio_pci.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index e2ee80f..68dc8da 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -179,10 +179,8 @@ static int vfio_pci_open(void *device_data) goto error; ret = vfio_spapr_pci_eeh_open(vdev-pdev); - if (ret) { - vfio_pci_disable(vdev); - goto error; - } + if (ret) + pr_warn_once(EEH is not supported\n); } return 0; Now the next question, what's the point of vfio_spapr_pci_eeh_open() returning a value? Couldn't it return void now and this warning can go into eeh specific code? Thanks, Alex -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported
On Tue, 2014-08-05 at 21:44 -0600, Alex Williamson wrote: ret = vfio_spapr_pci_eeh_open(vdev-pdev); - if (ret) { - vfio_pci_disable(vdev); - goto error; - } + if (ret) + pr_warn_once(EEH is not supported\n); } return 0; Now the next question, what's the point of vfio_spapr_pci_eeh_open() returning a value? Couldn't it return void now and this warning can go into eeh specific code? Thanks, In order to call vfio_pci_disable() when that happens ? Cheers, Ben. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html