From patchwork Fri Jan 22 19:30:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 60202 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp51579lbb; Fri, 22 Jan 2016 11:33:43 -0800 (PST) X-Received: by 10.140.151.198 with SMTP id 189mr6201782qhx.75.1453491207116; Fri, 22 Jan 2016 11:33:27 -0800 (PST) Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com. [209.132.183.39]) by mx.google.com with ESMTPS id o33si8581660qge.42.2016.01.22.11.33.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2016 11:33:27 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 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 mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MJUqLk031474; Fri, 22 Jan 2016 14:30:52 -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 u0MJUoqH020007 for ; Fri, 22 Jan 2016 14:30:50 -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 u0MJUaPe002518; Fri, 22 Jan 2016 14:30:50 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 22 Jan 2016 14:30:32 -0500 Message-Id: <8516181e227fee35eb1d5a8f158275431c56e49a.1453489952.git.crobinso@redhat.com> 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 17/17] qemu: zap QEMU_CAPS_DEVICE 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 Remove the last remnants and blacklist it --- src/qemu/qemu_capabilities.c | 11 +++------ src/qemu/qemu_capabilities.h | 2 +- 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 | 32 +++++++++------------------ tests/qemuhotplugtest.c | 1 - tests/qemuxml2argvtest.c | 1 - 15 files changed, 15 insertions(+), 42 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 b5ed30c..a4e74bc 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1155,7 +1155,6 @@ virQEMUCapsComputeCmdFlags(const char *help, virQEMUCapsSet(qemuCaps, QEMU_CAPS_CHARDEV_SPICEPORT); } if (strstr(help, "-device")) { - virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE); /* * When -device was introduced, qemu already supported drive's * readonly option but didn't advertise that. @@ -3170,8 +3169,7 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const c /* virQEMUCapsExtractDeviceStr will only set additional caps if qemu * understands the 0.13.0+ notion of "-device driver,". */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE) && - strstr(help, "-device driver,?") && + if (strstr(help, "-device driver,?") && virQEMUCapsExtractDeviceStr(qemuCaps->binary, qemuCaps, runUid, runGid) < 0) { goto cleanup; @@ -3213,7 +3211,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_DEVICE); virQEMUCapsSet(qemuCaps, QEMU_CAPS_SDL); virQEMUCapsSet(qemuCaps, QEMU_CAPS_SMP_TOPOLOGY); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV); @@ -3827,8 +3824,7 @@ virQEMUCapsSupportsChardev(virDomainDefPtr def, virQEMUCapsPtr qemuCaps, virDomainChrDefPtr chr) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV) || - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV)) return false; if ((def->os.arch == VIR_ARCH_PPC) || ARCH_IS_PPC64(def->os.arch)) { @@ -3998,8 +3994,7 @@ virQEMUCapsFillDomainDeviceHostdevCaps(virQEMUCapsPtr qemuCaps, VIR_DOMAIN_CAPS_ENUM_SET(hostdev->subsysType, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI); - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCSI_GENERIC)) + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCSI_GENERIC)) VIR_DOMAIN_CAPS_ENUM_SET(hostdev->subsysType, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6ea8a78..86c38d0 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -82,7 +82,7 @@ typedef enum { /* 25 */ X_QEMU_CAPS_BALLOON, /* -balloon available */ - QEMU_CAPS_DEVICE, /* Is the new -device arg available */ + X_QEMU_CAPS_DEVICE, /* -device available */ QEMU_CAPS_SDL, /* Is the new -sdl arg available */ QEMU_CAPS_SMP_TOPOLOGY, /* -smp has sockets/cores/threads */ QEMU_CAPS_NETDEV, /* -netdev flag & netdev_add/remove */ diff --git a/tests/qemucapabilitiesdata/caps_1.2.2-1.caps b/tests/qemucapabilitiesdata/caps_1.2.2-1.caps index af93904..8ea30a9 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 87d9a89..682ba0f 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 ae7f4a8..f9deeeb 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 0db8a48..85434b8 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 23e6920..7c88d1e 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 db56973..a37a7cf 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 c98a7a5..f1ad74a 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 a8e9c16..53b24b7 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 15f56a3..fc41317 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 9d5c15c..e2fe62b 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 73b813e..fb3f2b5 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -70,19 +70,17 @@ static int testHelpStrParsing(const void *data) virQEMUCapsSet(flags, QEMU_CAPS_MONITOR_JSON); # endif - if (virQEMUCapsGet(info->flags, QEMU_CAPS_DEVICE)) { - VIR_FREE(path); - VIR_FREE(help); - if (virAsprintf(&path, "%s/qemuhelpdata/%s-device", abs_srcdir, - info->name) < 0) - goto cleanup; - - if (virtTestLoadFile(path, &help) < 0) - goto cleanup; - - if (virQEMUCapsParseDeviceStr(flags, help) < 0) - goto cleanup; - } + VIR_FREE(path); + VIR_FREE(help); + if (virAsprintf(&path, "%s/qemuhelpdata/%s-device", abs_srcdir, + info->name) < 0) + goto cleanup; + + if (virtTestLoadFile(path, &help) < 0) + goto cleanup; + + if (virQEMUCapsParseDeviceStr(flags, help) < 0) + goto cleanup; got = virQEMUCapsFlagsString(flags); expected = virQEMUCapsFlagsString(info->flags); @@ -157,7 +155,6 @@ mymain(void) QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_SDL, QEMU_CAPS_CHARDEV, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_RTC, QEMU_CAPS_NO_HPET, @@ -181,7 +178,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, QEMU_CAPS_RTC, @@ -227,7 +223,6 @@ mymain(void) QEMU_CAPS_MEM_PATH, QEMU_CAPS_SDL, QEMU_CAPS_CHARDEV, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_RTC, QEMU_CAPS_VHOST_NET, @@ -257,7 +252,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, QEMU_CAPS_RTC, @@ -313,7 +307,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, QEMU_CAPS_RTC, @@ -367,7 +360,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, QEMU_CAPS_RTC, @@ -429,7 +421,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, QEMU_CAPS_RTC, @@ -507,7 +498,6 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_ENABLE_KVM, QEMU_CAPS_MONITOR_JSON, - QEMU_CAPS_DEVICE, QEMU_CAPS_SMP_TOPOLOGY, QEMU_CAPS_NETDEV, QEMU_CAPS_RTC, diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 102e052..3c1d1ec 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -71,7 +71,6 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, goto cleanup; /* for attach & detach qemu must support -device */ - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE); if (event) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1c73e3f..0949c63 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -293,7 +293,6 @@ static int testCompareXMLToArgvFiles(const char *xml, virQEMUCapsSetList(extraFlags, QEMU_CAPS_NO_ACPI, - QEMU_CAPS_DEVICE, QEMU_CAPS_LAST); if (STREQ(vmdef->os.machine, "pc") &&