From patchwork Mon Sep 25 10:51:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9969701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB488602D8 for ; Mon, 25 Sep 2017 10:56:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E22F628BAA for ; Mon, 25 Sep 2017 10:56:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D715C28BFF; Mon, 25 Sep 2017 10:56:18 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 83AB528BAA for ; Mon, 25 Sep 2017 10:56:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwR1e-0008FT-MB; Mon, 25 Sep 2017 10:54:10 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwR1d-0008EM-ST for xen-devel@lists.xenproject.org; Mon, 25 Sep 2017 10:54:09 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id 09/18-03414-150E8C95; Mon, 25 Sep 2017 10:54:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRWlGSWpSXmKPExsXitHSDvW7AgxO RBsffG1h83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBlr5pxlLmiRqDj87QhLA+MDgS5GTg4JAX+J Bb9eM4LYbAI6Ehfn7mTrYuTgEBFQkbi916CLkYuDWeAgo8SxJ3tZQeLCAsUS877Eg5SzCKhKb D/1GyzMK2Al8fuTC4gpIaAn8WO7IYjJCRT9vDQJpFhIwFLiwPdeNhCbV0BQ4uTMJywgNrOApk Tr9t/sELa8RPPW2cwQ9YoS/fMesE1g5JuFpGUWkpZZSFoWMDKvYlQvTi0qSy3SNdNLKspMzyj JTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgMMQYg2ME474T/IUZJDiYlUd67fCcihfiS8lMq MxKLM+KLSnNSiw8xynBwKEnwmt0HygkWpaanVqRl5gCDHSYtwcGjJMIrBJLmLS5IzC3OTIdIn WI05ji26fIfJo6Om3f/MAmx5OXnpUqJ856+B1QqAFKaUZoHNwgWhZcYZaWEeRmBThPiKUgtys 0sQZV/xSjOwagkzCsCspAnM68Ebt8roFOYgE7pnQp2SkkiQkqqgXHK0163jV9SeS0f9fFckzk Y/i/fZvqqTK1MJ0/1vf5FFYFT/xyS2/0hfUL7miTzCN+t6fYmO5ZnnNTc+dbWasOBXUse9wpH RtyMnXPhx4nKnm2r98lP9t7XIHNVrDOem4c3xKGzf+HFOTqiOvWaDoI9rbxXExuWbzglvOTU5 TW/GMJjpl+ujVFiKc5INNRiLipOBAD2+4wfvQIAAA== X-Env-Sender: prvs=43456bc54=roger.pau@citrix.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1506336847!84327526!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19617 invoked from network); 25 Sep 2017 10:54:08 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 25 Sep 2017 10:54:08 -0000 X-IronPort-AV: E=Sophos;i="5.42,435,1500940800"; d="scan'208";a="449070342" From: Roger Pau Monne To: Date: Mon, 25 Sep 2017 11:51:59 +0100 Message-ID: <20170925105206.66507-16-roger.pau@citrix.com> X-Mailer: git-send-email 2.13.5 (Apple Git-94) In-Reply-To: <20170925105206.66507-1-roger.pau@citrix.com> References: <20170925105206.66507-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: wei.liu2@citrix.com, boris.ostrovsky@oracle.com, Roger Pau Monne , Ian Jackson Subject: [Xen-devel] [PATCH v3 15/22] libxl: add PVH support to vpcu hotplug, domain destruction/pause and domain configuration X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP And remove support for device model "none". Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_domain.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index 08eccd082b..0387e37699 100644 --- a/tools/libxl/libxl_domain.c +++ b/tools/libxl/libxl_domain.c @@ -571,14 +571,11 @@ int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid) } if (type == LIBXL_DOMAIN_TYPE_HVM) { - if (libxl__device_model_version_running(gc, domid) != - LIBXL_DEVICE_MODEL_VERSION_NONE) { - rc = libxl__domain_resume_device_model(gc, domid); - if (rc < 0) { - LOGD(ERROR, domid, "Failed to unpause device model for domain:%d", - rc); - goto out; - } + rc = libxl__domain_resume_device_model(gc, domid); + if (rc < 0) { + LOGD(ERROR, domid, + "Failed to unpause device model for domain: %d", rc); + goto out; } } ret = xc_domain_unpause(ctx->xch, domid); @@ -1012,6 +1009,7 @@ void libxl__destroy_domid(libxl__egc *egc, libxl__destroy_domid_state *dis) break; } /* fall through */ + case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_PV: dm_present = libxl__dm_active(gc, domid); break; @@ -1349,7 +1347,6 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) case LIBXL_DOMAIN_TYPE_HVM: switch (libxl__device_model_version_running(gc, domid)) { case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: - case LIBXL_DEVICE_MODEL_VERSION_NONE: break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: rc = libxl__set_vcpuonline_qmp(gc, domid, cpumap, &info); @@ -1358,6 +1355,7 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) rc = ERROR_INVAL; } break; + case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_PV: break; default: @@ -1584,7 +1582,6 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, max_vcpus, map); break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: - case LIBXL_DEVICE_MODEL_VERSION_NONE: rc = libxl__update_avail_vcpus_xenstore(gc, domid, max_vcpus, map); break; @@ -1592,6 +1589,7 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, abort(); } break; + case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_PV: rc = libxl__update_avail_vcpus_xenstore(gc, domid, max_vcpus, map);