Received: from eggs.gnu.org ([2001:4830:134:3::10]:52489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUGqC-0000ZD-VM for qemu-devel@nongnu.org; Mon, 01 Aug 2016 13:17:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUGq8-0007JW-Jp for qemu-devel@nongnu.org; Mon, 01 Aug 2016 13:17:24 -0400 Message-Id: <579F2FBA020000480012E89B@prv-mh.provo.novell.com> Date: Mon, 01 Aug 2016 11:17:14 -0600 From: "Bruce Rogers" References: <1469633448-10692-1-git-send-email-brogers@suse.com> <579977B8.4090600@cn.fujitsu.com> In-Reply-To: <579977B8.4090600@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-2.7] Xen PCI passthrough: fix passthrough failure when no interrupt pin List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin , qemu-devel@nongnu.org Cc: anthony.perard@citrix.com, qemu-stable@nongnu.org Hi Cao,=20 Upon re-reading your comment, I believe you are still thinking that=20 it was right to use the error object in this context. The fact that = this=20 device has no pin interrupt is _not_ an error condition, and hence the=20 use of error_setg() is not appropriate, and in fact causes Xen HVM PCI=20 passthrough to fail, when it would otherwise succeed.=20 This patch does not attempt to address any shortcomings with=20 XEN_PT_LOG, since it is still in use in many other places in this = source=20 file.=20 hth,=20 Bruce=20 >>> Cao jin 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 > --- > 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; > } > >