From patchwork Mon Sep 25 10:51:55 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: 9969699 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 B2CF5602D8 for ; Mon, 25 Sep 2017 10:56:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA0C028BAA for ; Mon, 25 Sep 2017 10:56:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EF1128BFF; Mon, 25 Sep 2017 10:56:10 +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 5377B28BAA for ; Mon, 25 Sep 2017 10:56:10 +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 1dwR1X-00088h-7w; Mon, 25 Sep 2017 10:54:03 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwR1W-000873-10 for xen-devel@lists.xenproject.org; Mon, 25 Sep 2017 10:54:02 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id 87/C2-03610-940E8C95; Mon, 25 Sep 2017 10:54:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHRDpK7HgxO RBucfWVl83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmPv29mLLjLW3HiRy9bA2MjdxcjJ4eEgL/E s2mP2UFsNgEdiYtzd7J1MXJwiAioSNzea9DFyMXBLHCQUeLYk72sIDXCAvESV7auA7NZBFQlT n17ywJSzytgJTHtTziIKSGgJ/FjuyGIyQkU/bw0CaRYSMBS4sD3XjYQm1dAUOLkzCcsIDazgK ZE6/bf7BC2vETz1tnMEPWKEv3zHrBNYOSbhaRlFpKWWUhaFjAyr2LUKE4tKkst0jW00Esqykz PKMlNzMzRNTQw08tNLS5OTE/NSUwq1kvOz93ECAwzBiDYwXhzY8AhRkkOJiVR3rt8JyKF+JLy UyozEosz4otKc1KLDzHKcHAoSfAW3AfKCRalpqdWpGXmAAMeJi3BwaMkwisEkuYtLkjMLc5Mh 0idYtTl6Lh59w+TEEtefl6qlDivP0iRAEhRRmke3AhY9F1ilJUS5mUEOkqIpyC1KDezBFX+Fa M4B6OSMG8gyBSezLwSuE2vgI5gAjqidyrYESWJCCmpBsa6LRUWNTv2M+lyi7Eetlv/YslNB2O jzVZWGi9ibT65+Vmdt9uzKrLRTPjfbJbynTdfvFe+33YgYaqJoYniV7WaNo0HZ3fE3/1cMPXr 6tl33kYn2P0UkS8R3WLhtLuk2DdN69Fc2ZZX0RsmhLM/5PBWvJpkqm0QaLz0aQ/7LsHvO79ud Baz3qPEUpyRaKjFXFScCADVIrxQuQIAAA== X-Env-Sender: prvs=43456bc54=roger.pau@citrix.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1506336837!108851886!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4953 invoked from network); 25 Sep 2017 10:54:00 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-13.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 25 Sep 2017 10:54:00 -0000 X-IronPort-AV: E=Sophos;i="5.42,435,1500940800"; d="scan'208";a="441052450" From: Roger Pau Monne To: Date: Mon, 25 Sep 2017 11:51:55 +0100 Message-ID: <20170925105206.66507-12-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 11/22] libxl: remove device model "none" support from disk related functions 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 CD-ROM backend selection was partially based on the device model, this is no longer needed since the device model "none" is now removed, so HVM guests always have a device model. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_disk.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/libxl/libxl_disk.c b/tools/libxl/libxl_disk.c index 7111b42d7c..8ff594e952 100644 --- a/tools/libxl/libxl_disk.c +++ b/tools/libxl/libxl_disk.c @@ -166,9 +166,7 @@ static int libxl__device_disk_setdefault(libxl__gc *gc, uint32_t domid, /* Force Qdisk backend for CDROM devices of guests with a device model. */ if (disk->is_cdrom != 0 && - libxl__domain_type(gc, domid) == LIBXL_DOMAIN_TYPE_HVM && - libxl__device_model_version_running(gc, domid) != - LIBXL_DEVICE_MODEL_VERSION_NONE) { + libxl__domain_type(gc, domid) == LIBXL_DOMAIN_TYPE_HVM) { if (!(disk->backend == LIBXL_DISK_BACKEND_QDISK || disk->backend == LIBXL_DISK_BACKEND_UNKNOWN)) { LOGD(ERROR, domid, "Backend for CD devices on HVM guests must be Qdisk"); @@ -735,12 +733,6 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - if (dm_ver == LIBXL_DEVICE_MODEL_VERSION_NONE) { - LOGD(ERROR, domid, "Guests without a device model cannot use cd-insert"); - rc = ERROR_FAIL; - goto out; - } - disks = libxl__device_list(gc, &libxl__disk_devtype, domid, "vbd", &num); for (i = 0; i < num; i++) { if (disks[i].is_cdrom && !strcmp(disk->vdev, disks[i].vdev))