From c1f684eac1fc223c4faefc18b7f50af54f6a01ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 29 Mar 2018 12:51:55 +0200 Subject: [PATCH] qemu: deprecate QEMU_CAPS_VHOST_NET MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implied by QEMU >= 1.2.0. Signed-off-by: Ján Tomko Reviewed-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 1 - src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 3 +-- src/qemu/qemu_hotplug.c | 9 +++------ src/qemu/qemu_interface.c | 4 +--- src/qemu/qemu_interface.h | 1 - tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 - 31 files changed, 6 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4b6a86d3b8..4fb586f1d9 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3631,7 +3631,6 @@ static qemuMonitorCallbacks callbacks = { static void virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps) { - virQEMUCapsSet(qemuCaps, QEMU_CAPS_VHOST_NET); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NODEFCONFIG); virQEMUCapsSet(qemuCaps, QEMU_CAPS_BOOT_MENU); virQEMUCapsSet(qemuCaps, QEMU_CAPS_FSDEV); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 75f389fd2d..2f15da0729 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -91,7 +91,7 @@ typedef enum { /* 30 */ X_QEMU_CAPS_RTC, /* The -rtc flag for clock options */ - QEMU_CAPS_VHOST_NET, /* vhost-net support available */ + X_QEMU_CAPS_VHOST_NET, /* vhost-net support available */ X_QEMU_CAPS_RTC_TD_HACK, /* -rtc-td-hack available */ QEMU_CAPS_NO_HPET, /* -no-hpet flag is supported */ QEMU_CAPS_NO_KVM_PIT, /* -no-kvm-pit-reinjection supported */ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 314b20f30e..0c109c63e7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8478,8 +8478,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, memset(vhostfd, -1, vhostfdSize * sizeof(vhostfd[0])); - if (qemuInterfaceOpenVhostNet(def, net, qemuCaps, - vhostfd, &vhostfdSize) < 0) + if (qemuInterfaceOpenVhostNet(def, net, vhostfd, &vhostfdSize) < 0) goto cleanup; } diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 9c52bccdf1..8d3191f971 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -895,8 +895,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, tapfd, &tapfdSize) < 0) goto cleanup; iface_connected = true; - if (qemuInterfaceOpenVhostNet(vm->def, net, priv->qemuCaps, - vhostfd, &vhostfdSize) < 0) + if (qemuInterfaceOpenVhostNet(vm->def, net, vhostfd, &vhostfdSize) < 0) goto cleanup; break; @@ -916,8 +915,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, VIR_NETDEV_VPORT_PROFILE_OP_CREATE) < 0) goto cleanup; iface_connected = true; - if (qemuInterfaceOpenVhostNet(vm->def, net, priv->qemuCaps, - vhostfd, &vhostfdSize) < 0) + if (qemuInterfaceOpenVhostNet(vm->def, net, vhostfd, &vhostfdSize) < 0) goto cleanup; break; @@ -936,8 +934,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, tapfd, tapfdSize) < 0) goto cleanup; iface_connected = true; - if (qemuInterfaceOpenVhostNet(vm->def, net, priv->qemuCaps, - vhostfd, &vhostfdSize) < 0) + if (qemuInterfaceOpenVhostNet(vm->def, net, vhostfd, &vhostfdSize) < 0) goto cleanup; break; diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c index 2a11cda5c9..ffa4b875c0 100644 --- a/src/qemu/qemu_interface.c +++ b/src/qemu/qemu_interface.c @@ -624,7 +624,6 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def, int qemuInterfaceOpenVhostNet(virDomainDefPtr def, virDomainNetDefPtr net, - virQEMUCapsPtr qemuCaps, int *vhostfd, size_t *vhostfdSize) { @@ -645,8 +644,7 @@ qemuInterfaceOpenVhostNet(virDomainDefPtr def, /* If qemu doesn't support vhost-net mode (including the -netdev and * -device command options), don't try to open the device. */ - if (!(virQEMUCapsGet(qemuCaps, QEMU_CAPS_VHOST_NET) && - qemuDomainSupportsNicdev(def, net))) { + if (!qemuDomainSupportsNicdev(def, net)) { if (net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_VHOST) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("vhost-net is not supported with " diff --git a/src/qemu/qemu_interface.h b/src/qemu/qemu_interface.h index a7faa0b3da..45fdbc4b8e 100644 --- a/src/qemu/qemu_interface.h +++ b/src/qemu/qemu_interface.h @@ -56,7 +56,6 @@ int qemuInterfaceBridgeConnect(virDomainDefPtr def, int qemuInterfaceOpenVhostNet(virDomainDefPtr def, virDomainNetDefPtr net, - virQEMUCapsPtr qemuCaps, int *vhostfd, size_t *vhostfdSize); #endif /* __QEMU_INTERFACE_H__ */ diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml index 7c955619d0..3cc8c22c26 100644 --- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml index 367bccb45f..617759bf86 100644 --- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml index 33177319ce..a02826bb09 100644 --- a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml index a3cab2311a..49458e7439 100644 --- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml index 41f074eeec..c74e636dc1 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml index 7845bdc4c5..cfac4d99ae 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml index f049a52608..0b105afaec 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml index 159e8ff1b4..a2eb37e9fa 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml index df387eb0d7..23ba2678f7 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml index 9d639179c8..1eadfb6cc0 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml index 5d82833fe4..34f5567146 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml index af9d76bf8d..bd675a946f 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml index e826063cc6..821ddca4f5 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml index c625b4370d..f2cfab0a79 100644 --- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml index 3cd75995a6..fa3140ffd4 100644 --- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml index 935cb80656..4217dc9c3b 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml index 1f60ea7b0f..eaab5d4674 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml index 8c41977cab..d519a93a98 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml index 2dd9569b69..80bb743f3b 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml index 3f564ac7e2..a20a762227 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml index 83ec66d5ea..6f66983e70 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml index 8b31e10913..b8b4a5f22c 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml index 724d622514..f45a5023db 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml index e04b10f160..5031a9450d 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml @@ -4,7 +4,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 627179eef4..2078c4533c 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -4,7 +4,6 @@ 0 - -- GitLab