From patchwork Tue Oct 16 02:14:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Zhao X-Patchwork-Id: 984467 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42YzXP03WKz9sCf for ; Tue, 16 Oct 2018 13:19:31 +1100 (AEDT) Received: from localhost ([::1]:55633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCExC-0003C7-NA for incoming@patchwork.ozlabs.org; Mon, 15 Oct 2018 22:19:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCEwn-0003Bo-GV for qemu-devel@nongnu.org; Mon, 15 Oct 2018 22:19:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCEwa-0004sz-Ba for qemu-devel@nongnu.org; Mon, 15 Oct 2018 22:18:51 -0400 Received: from mga12.intel.com ([192.55.52.136]:26038) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCEwZ-0004e5-Q3 for qemu-devel@nongnu.org; Mon, 15 Oct 2018 22:18:48 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2018 19:18:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,386,1534834800"; d="scan'208";a="88625361" Received: from joy-optiplex-7040.sh.intel.com ([10.239.13.9]) by FMSMGA003.fm.intel.com with ESMTP; 15 Oct 2018 19:18:39 -0700 From: Zhao Yan To: qemu-devel@nongnu.org, sstabellini@kernel.org, anthony.perard@citrix.com, xen-devel@lists.xenproject.org Date: Mon, 15 Oct 2018 22:14:39 -0400 Message-Id: <20181016021439.6212-1-yan.y.zhao@intel.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.136 Subject: [Qemu-devel] [PATCH] Xen PCI passthrough: fix passthrough failure when irq map failure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhao Yan Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Commit 5a11d0f7 mistakenly converted a log message into an error condition when irq map is failed for the pci device being passed through. Revert that part of the commit. Signed-off-by: Zhao Yan --- hw/xen/xen_pt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index e5a6eff44f..840fd0f748 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -849,7 +849,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp) machine_irq = s->real_device.irq; rc = xc_physdev_map_pirq(xen_xc, xen_domid, machine_irq, &pirq); if (rc < 0) { - error_setg_errno(errp, errno, "Mapping machine irq %u to" + XEN_PT_ERR(d, "Mapping machine irq %u to" " pirq %i failed", machine_irq, pirq); /* Disable PCI intx assertion (turn on bit10 of devctl) */ @@ -871,7 +871,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp) PCI_SLOT(d->devfn), e_intx); if (rc < 0) { - error_setg_errno(errp, errno, "Binding of interrupt %u failed", + XEN_PT_ERR(d, "Binding of interrupt %u failed", e_intx); /* Disable PCI intx assertion (turn on bit10 of devctl) */