public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Gavin Shan <gwshan@linux.vnet.ibm.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported
Date: Tue, 05 Aug 2014 21:44:19 -0600	[thread overview]
Message-ID: <1407296659.316.78.camel@ul30vt.home> (raw)
In-Reply-To: <1407293313-24894-5-git-send-email-aik@ozlabs.ru>

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 <aik@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


  reply	other threads:[~2014-08-06  3:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  2:48 [PATCH v2 0/4] vfio: eeh: spapr: Compile and compatibility fixes Alexey Kardashevskiy
2014-08-06  2:48 ` [PATCH v2 1/4] powerpc/eeh: Export eeh_iommu_group_to_pe() Alexey Kardashevskiy
2014-08-06  2:48 ` [PATCH v2 2/4] vfio: spapr: Fix build error Alexey Kardashevskiy
2014-08-06  3:12   ` Alex Williamson
2014-08-06  3:54     ` Gavin Shan
2014-08-06  6:33       ` Alexey Kardashevskiy
2014-08-06  6:57         ` Gavin Shan
2014-08-06  2:48 ` [PATCH v2 3/4] vfio_spapr_eeh: Enable compile as a module Alexey Kardashevskiy
2014-08-06  2:48 ` [PATCH v2 4/4] vfio_pci: spapr: Enable VFIO if EEH is not supported Alexey Kardashevskiy
2014-08-06  3:44   ` Alex Williamson [this message]
2014-08-06  4:34     ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407296659.316.78.camel@ul30vt.home \
    --to=alex.williamson@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=benh@kernel.crashing.org \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox