From nobody Tue Feb 10 04:03:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1568914908; cv=none; d=zoho.com; s=zohoarc; b=nf7gKXKjOqePjv1q9wQCMcZ9jYG3P3FWeEsCEUOLPouf+TX3JZVpTJuau8lvmy+GEQkPmA0xtn/wjHHhbmTA/NCOPNgGrruzItB2WXjuF0urzAvOzPiyl9SoOqnnZirZn8pnxHUtpMVqmxGf0451FaR9Bog3U/3qEWdnjXuDnzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568914908; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Fl5GZz2Fz3CVOCyhVMbkaG5AQ7UgcHyI1Kf79vprqCU=; b=Ipve0B4jzkKZ4hz/jXeQ29VvpdR4QCzxANu6kosjUsDSnvZorg5tmB2ahB4fMhX1cVFkJ/fR/UI74NJm60nZph9hO/mYkVCzoEEMA3sC3tHa8sF6zYewG4EJNPUsnwxhr/JzBj8E8W1G8TC4TOAZ82HMWd19A9/hiQvyN9HHmHs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1568914908008896.6723927447484; Thu, 19 Sep 2019 10:41:48 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iB0QD-0004Ax-Aw; Thu, 19 Sep 2019 17:40:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iB0QC-0004Ac-4N for xen-devel@lists.xenproject.org; Thu, 19 Sep 2019 17:40:48 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 98c493f8-db04-11e9-b299-bc764e2007e4; Thu, 19 Sep 2019 17:40:40 +0000 (UTC) X-Inumbo-ID: 98c493f8-db04-11e9-b299-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568914840; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a9J09fdodeDSbFx/jslZyCcYyIiZk3yNPrVs1emhmHk=; b=Qxocw1Vmxaxxg7NnH6g5KoZLRtBgVCEiI9qRhX4dhVkG74+dmvbhKGrb Ei02G0zye4j3KMchFjvZKiXAFAC8rQ0trC/SViUdQfzjFE1TeHVKMfV47 l6wiUCWSeesksTFyOiA/WfIDsbPYiMBTeVhe9nQyrC+4xRiZQuacAyLak c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: fQ73rtjWQQcMhAZL/ih9nyDmAFf7j2gaEuyXRs+TKF+XPB3laAk0XE5zdALZGWzv72EkDajHOx 5G/sakTXh/QjLtXCk8PHBFybYVSFtgKN/AF6CLHRTzoeN+/b8JHpOlzyxGQsb/rHDSPThPs2Tp pGuw3WDh/4W58RBj5/F45IeE+sNECOV7ajYxximJLXK9XE9B4Sh0oR505fYT/fN6DJb0MyDB5u Slxh7bX6YIDG/pFa2H82oiGKZewr6BCT2TH+EEEm1sUUlqYVZBbEqWTIiZEbx6pm8z9bePSyWF pCk= X-SBRS: 2.7 X-MesageID: 5801743 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,524,1559534400"; d="scan'208";a="5801743" From: Anthony PERARD To: Date: Thu, 19 Sep 2019 18:16:46 +0100 Message-ID: <20190919171656.899649-27-anthony.perard@citrix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919171656.899649-1-anthony.perard@citrix.com> References: <20190919171656.899649-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 26/35] libxl_pci: Only check if qemu-dm is running in qemu-trad case X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Ian Jackson , Wei Liu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) QEMU upstream (or qemu-xen) may not have set "running" state in xenstore. "running" with QEMU doesn't mean that the binary is running, it means that the emulation have started. When adding a pci-passthrough device to QEMU, we do so via QMP, we have a direct answer to whether QEMU is running or not, no need to check ahead. Moving the check to do it only with qemu-trad makes upcoming changes simpler. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_pci.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index b9ca69f5f0b3..071880b8556b 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -1004,13 +1004,13 @@ static int do_pci_add(libxl__gc *gc, uint32_t domid, =20 if (type =3D=3D LIBXL_DOMAIN_TYPE_HVM) { hvm =3D 1; - if (libxl__wait_for_device_model_deprecated(gc, domid, "running", - NULL, NULL, NULL) < 0) { - rc =3D ERROR_FAIL; - goto out; - } switch (libxl__device_model_version_running(gc, domid)) { case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: + if (libxl__wait_for_device_model_deprecated(gc, domid, + "running", NULL, NULL, NULL) < 0) { + rc =3D ERROR_FAIL; + goto out; + } rc =3D qemu_pci_add_xenstore(gc, domid, pcidev); break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: @@ -1395,12 +1395,11 @@ static int do_pci_remove(libxl__gc *gc, uint32_t do= mid, rc =3D ERROR_FAIL; if (type =3D=3D LIBXL_DOMAIN_TYPE_HVM) { hvm =3D 1; - if (libxl__wait_for_device_model_deprecated(gc, domid, "running", - NULL, NULL, NULL) < 0) - goto out_fail; - switch (libxl__device_model_version_running(gc, domid)) { case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: + if (libxl__wait_for_device_model_deprecated(gc, domid, + "running", NULL, NULL, NULL) < 0) + goto out_fail; rc =3D qemu_pci_remove_xenstore(gc, domid, pcidev, force); break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel