From patchwork Fri Jan 22 19:30:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 60205 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp51672lbb; Fri, 22 Jan 2016 11:33:54 -0800 (PST) X-Received: by 10.194.109.2 with SMTP id ho2mr5694762wjb.66.1453491213553; Fri, 22 Jan 2016 11:33:33 -0800 (PST) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id dz12si10023578wjb.180.2016.01.22.11.33.32 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 22 Jan 2016 11:33:33 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0MJV0Lo010403; Fri, 22 Jan 2016 14:31:01 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0MJUnuF019990 for ; Fri, 22 Jan 2016 14:30:49 -0500 Received: from colepc.redhat.com (ovpn-113-198.phx2.redhat.com [10.3.113.198]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MJUaPc002518; Fri, 22 Jan 2016 14:30:49 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 22 Jan 2016 14:30:30 -0500 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 15/17] qemu: zap QEMU_CAPS_BALLOON X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com It's only usage is in a !QEMU_CAPS_DEVICE code path. Remove that code, and blacklist it --- src/qemu/qemu_capabilities.c | 3 --- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 20 +++++++++----------- tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 1 - tests/qemucapabilitiesdata/caps_1.3.1-1.caps | 1 - tests/qemucapabilitiesdata/caps_1.4.2-1.caps | 1 - tests/qemucapabilitiesdata/caps_1.5.3-1.caps | 1 - tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 1 - tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 1 - tests/qemucapabilitiesdata/caps_2.1.1-1.caps | 1 - tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 1 - tests/qemucapabilitiesdata/caps_2.5.0-1.caps | 1 - tests/qemucapabilitiesdata/caps_2.6.0-1.caps | 1 - tests/qemuhelptest.c | 8 -------- 14 files changed, 10 insertions(+), 33 deletions(-) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3099e34..8c29165 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1156,8 +1156,6 @@ virQEMUCapsComputeCmdFlags(const char *help, if (strstr(help, "-chardev spiceport")) virQEMUCapsSet(qemuCaps, QEMU_CAPS_CHARDEV_SPICEPORT); } - if (strstr(help, "-balloon")) - virQEMUCapsSet(qemuCaps, QEMU_CAPS_BALLOON); if (strstr(help, "-device")) { virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE); /* @@ -3217,7 +3215,6 @@ virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps) virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL); virQEMUCapsSet(qemuCaps, QEMU_CAPS_CHARDEV); virQEMUCapsSet(qemuCaps, QEMU_CAPS_MONITOR_JSON); - virQEMUCapsSet(qemuCaps, QEMU_CAPS_BALLOON); virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE); virQEMUCapsSet(qemuCaps, QEMU_CAPS_SDL); virQEMUCapsSet(qemuCaps, QEMU_CAPS_SMP_TOPOLOGY); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index e5353de..bca4ef4 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -81,7 +81,7 @@ typedef enum { QEMU_CAPS_MONITOR_JSON, /* JSON mode for monitor */ /* 25 */ - QEMU_CAPS_BALLOON, /* -balloon available */ + X_QEMU_CAPS_BALLOON, /* -balloon available */ QEMU_CAPS_DEVICE, /* Is the new -device arg available */ QEMU_CAPS_SDL, /* Is the new -sdl arg available */ QEMU_CAPS_SMP_TOPOLOGY, /* -smp has sockets/cores/threads */ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 733d498..4007621 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10953,24 +10953,22 @@ qemuBuildCommandLine(virConnectPtr conn, if (def->memballoon && def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_NONE) { + char *optstr; + if (def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Memory balloon device type '%s' is not supported by this version of qemu"), virDomainMemballoonModelTypeToString(def->memballoon->model)); goto error; } - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) { - char *optstr; - virCommandAddArg(cmd, "-device"); - optstr = qemuBuildMemballoonDevStr(def, def->memballoon, qemuCaps); - if (!optstr) - goto error; - virCommandAddArg(cmd, optstr); - VIR_FREE(optstr); - } else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BALLOON)) { - virCommandAddArgList(cmd, "-balloon", "virtio", NULL); - } + virCommandAddArg(cmd, "-device"); + + optstr = qemuBuildMemballoonDevStr(def, def->memballoon, qemuCaps); + if (!optstr) + goto error; + virCommandAddArg(cmd, optstr); + VIR_FREE(optstr); } for (i = 0; i < def->nrngs; i++) { diff --git a/tests/qemucapabilitiesdata/caps_1.2.2-1.caps b/tests/qemucapabilitiesdata/caps_1.2.2-1.caps index 34ddd80..af93904 100644 --- a/tests/qemucapabilitiesdata/caps_1.2.2-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.2.2-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_1.3.1-1.caps b/tests/qemucapabilitiesdata/caps_1.3.1-1.caps index cb8eac9..87d9a89 100644 --- a/tests/qemucapabilitiesdata/caps_1.3.1-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.3.1-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_1.4.2-1.caps b/tests/qemucapabilitiesdata/caps_1.4.2-1.caps index 86982f1..ae7f4a8 100644 --- a/tests/qemucapabilitiesdata/caps_1.4.2-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.4.2-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_1.5.3-1.caps b/tests/qemucapabilitiesdata/caps_1.5.3-1.caps index 5401d65..0db8a48 100644 --- a/tests/qemucapabilitiesdata/caps_1.5.3-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.5.3-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps index 63536a7..23e6920 100644 --- a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps index 6717a94..db56973 100644 --- a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps +++ b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.1.1-1.caps b/tests/qemucapabilitiesdata/caps_2.1.1-1.caps index 332b85a..c98a7a5 100644 --- a/tests/qemucapabilitiesdata/caps_2.1.1-1.caps +++ b/tests/qemucapabilitiesdata/caps_2.1.1-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.4.0-1.caps b/tests/qemucapabilitiesdata/caps_2.4.0-1.caps index e411542..a8e9c16 100644 --- a/tests/qemucapabilitiesdata/caps_2.4.0-1.caps +++ b/tests/qemucapabilitiesdata/caps_2.4.0-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.5.0-1.caps b/tests/qemucapabilitiesdata/caps_2.5.0-1.caps index 931bc4f..15f56a3 100644 --- a/tests/qemucapabilitiesdata/caps_2.5.0-1.caps +++ b/tests/qemucapabilitiesdata/caps_2.5.0-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-1.caps b/tests/qemucapabilitiesdata/caps_2.6.0-1.caps index f32d5aa..9d5c15c 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0-1.caps +++ b/tests/qemucapabilitiesdata/caps_2.6.0-1.caps @@ -4,7 +4,6 @@ - diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 35fc9c7..26455d5 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -157,7 +157,6 @@ mymain(void) QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_SDL, QEMU_CAPS_CHARDEV, - QEMU_CAPS_BALLOON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_RTC, @@ -183,7 +182,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_BALLOON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, @@ -231,7 +229,6 @@ mymain(void) QEMU_CAPS_MEM_PATH, QEMU_CAPS_SDL, QEMU_CAPS_CHARDEV, - QEMU_CAPS_BALLOON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_RTC, @@ -263,7 +260,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_BALLOON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, @@ -321,7 +317,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_BALLOON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, @@ -376,7 +371,6 @@ mymain(void) QEMU_CAPS_MEM_PATH, QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, - QEMU_CAPS_BALLOON, QEMU_CAPS_MONITOR_JSON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, @@ -440,7 +434,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_BALLOON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, @@ -519,7 +512,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_BALLOON, QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV,