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: 10642587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A0BB18BC for ; Tue, 16 Oct 2018 02:19:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23EDD29B73 for ; Tue, 16 Oct 2018 02:19:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1834929D83; Tue, 16 Oct 2018 02:19:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BBD9E29D6B for ; Tue, 16 Oct 2018 02:19:44 +0000 (UTC) Received: from localhost ([::1]:55635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCExT-0003Uk-0N for patchwork-qemu-devel@patchwork.kernel.org; Mon, 15 Oct 2018 22:19:43 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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) */