All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin
@ 2016-07-27 15:30 Bruce Rogers
  2016-07-28  3:10 ` Cao jin
  2016-08-04 14:08 ` Anthony PERARD
  0 siblings, 2 replies; 5+ messages in thread
From: Bruce Rogers @ 2016-07-27 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, caoj.fnst, anthony.perard, Bruce Rogers

Commit 5a11d0f7 mistakenly converted a log message into an error
condition when no pin interrupt is found for the pci device being
passed through. Revert that part of the commit.

Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 hw/xen/xen_pt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index f593b04..b6d71bb 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -842,7 +842,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
         goto err_out;
     }
     if (!scratch) {
-        error_setg(errp, "no pin interrupt");
+        XEN_PT_LOG(d, "no pin interrupt\n");
         goto out;
     }
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin
  2016-07-27 15:30 [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin Bruce Rogers
@ 2016-07-28  3:10 ` Cao jin
  2016-08-01 17:17   ` Bruce Rogers
  2016-08-04 14:08 ` Anthony PERARD
  1 sibling, 1 reply; 5+ messages in thread
From: Cao jin @ 2016-07-28  3:10 UTC (permalink / raw)
  To: Bruce Rogers, qemu-devel; +Cc: qemu-stable, anthony.perard

hello bruce,

AFAIK, the message in error object will be printed to stderr or current 
monitor according whether we have a monitor. I just checked XEN_PT_LOG, 
message is only printed to stderr. If Xen pt device can be hotplugged 
via monitor command device_add, I guess using error object is right.

Yours Sincerely,
Cao jin

On 07/27/2016 11:30 PM, Bruce Rogers wrote:
> Commit 5a11d0f7 mistakenly converted a log message into an error
> condition when no pin interrupt is found for the pci device being
> passed through. Revert that part of the commit.
>
> Signed-off-by: Bruce Rogers <brogers@suse.com>
> ---
>   hw/xen/xen_pt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
> index f593b04..b6d71bb 100644
> --- a/hw/xen/xen_pt.c
> +++ b/hw/xen/xen_pt.c
> @@ -842,7 +842,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
>           goto err_out;
>       }
>       if (!scratch) {
> -        error_setg(errp, "no pin interrupt");
> +        XEN_PT_LOG(d, "no pin interrupt\n");
>           goto out;
>       }
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin
  2016-07-28  3:10 ` Cao jin
@ 2016-08-01 17:17   ` Bruce Rogers
  2016-08-04  2:51     ` Cao jin
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Rogers @ 2016-08-01 17:17 UTC (permalink / raw)
  To: Cao jin, qemu-devel; +Cc: anthony.perard, qemu-stable


Hi Cao, 

Upon re-reading your comment, I believe you are still thinking that 
it was right to use the error object in this context. The fact that this 
device has no pin interrupt is _not_ an error condition, and hence the 
use of error_setg() is not appropriate, and in fact causes Xen HVM PCI 
passthrough to fail, when it would otherwise succeed. 

This patch does not attempt to address any shortcomings with 
XEN_PT_LOG, since it is still in use in many other places in this source 
file. 

hth, 

Bruce 

>>> Cao jin <caoj.fnst@cn.fujitsu.com> 7/27/2016 9:10 PM >>>
hello bruce,

AFAIK, the message in error object will be printed to stderr or current
monitor according whether we have a monitor. I just checked XEN_PT_LOG,
message is only printed to stderr. If Xen pt device can be hotplugged
via monitor command device_add, I guess using error object is right.

Yours Sincerely,
Cao jin

On 07/27/2016 11:30 PM, Bruce Rogers wrote:
> Commit 5a11d0f7 mistakenly converted a log message into an error
> condition when no pin interrupt is found for the pci device being
> passed through. Revert that part of the commit.
>
> Signed-off-by: Bruce Rogers <brogers@suse.com>
> ---
>   hw/xen/xen_pt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
> index f593b04..b6d71bb 100644
> --- a/hw/xen/xen_pt.c
> +++ b/hw/xen/xen_pt.c
> @@ -842,7 +842,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
>           goto err_out;
>       }
>       if (!scratch) {
> -        error_setg(errp, "no pin interrupt");
> +        XEN_PT_LOG(d, "no pin interrupt\n");
>           goto out;
>       }
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin
  2016-08-01 17:17   ` Bruce Rogers
@ 2016-08-04  2:51     ` Cao jin
  0 siblings, 0 replies; 5+ messages in thread
From: Cao jin @ 2016-08-04  2:51 UTC (permalink / raw)
  To: Bruce Rogers, qemu-devel; +Cc: anthony.perard, qemu-stable



On 08/02/2016 01:17 AM, Bruce Rogers wrote:
> Hi Cao,
>
>
> Upon re-reading your comment, I believe you are still thinking that
>
> it was right to use the error object in this context. The fact that this
>
> device has no pin interrupt is _not_ an error condition, and hence the
>
> use of error_setg() is not appropriate, and in fact causes Xen HVM PCI
>
> passthrough to fail, when it would otherwise succeed.
>

Hi bruce,

Thanks for pointing it out, I didn't have much knowledge on this topic, 
but you words buys me, I am fine with the patch.

>
> This patch does not attempt to address any shortcomings with
>
> XEN_PT_LOG, since it is still in use in many other places in this source
>
> file.
>
>
> hth,
>
>
> Bruce
>
>

-- 
Yours Sincerely,

Cao jin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin
  2016-07-27 15:30 [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin Bruce Rogers
  2016-07-28  3:10 ` Cao jin
@ 2016-08-04 14:08 ` Anthony PERARD
  1 sibling, 0 replies; 5+ messages in thread
From: Anthony PERARD @ 2016-08-04 14:08 UTC (permalink / raw)
  To: Bruce Rogers; +Cc: qemu-devel, qemu-stable, caoj.fnst, sstabellini

On Wed, Jul 27, 2016 at 09:30:48AM -0600, Bruce Rogers wrote:
> Commit 5a11d0f7 mistakenly converted a log message into an error
> condition when no pin interrupt is found for the pci device being
> passed through. Revert that part of the commit.
> 
> Signed-off-by: Bruce Rogers <brogers@suse.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

> ---
>  hw/xen/xen_pt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
> index f593b04..b6d71bb 100644
> --- a/hw/xen/xen_pt.c
> +++ b/hw/xen/xen_pt.c
> @@ -842,7 +842,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
>          goto err_out;
>      }
>      if (!scratch) {
> -        error_setg(errp, "no pin interrupt");
> +        XEN_PT_LOG(d, "no pin interrupt\n");
>          goto out;
>      }
>  
> -- 
> 1.9.0
> 

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-04 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-27 15:30 [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin Bruce Rogers
2016-07-28  3:10 ` Cao jin
2016-08-01 17:17   ` Bruce Rogers
2016-08-04  2:51     ` Cao jin
2016-08-04 14:08 ` Anthony PERARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.