提交 c1f684ea 编写于 作者: J Ján Tomko

qemu: deprecate QEMU_CAPS_VHOST_NET

Implied by QEMU >= 1.2.0.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 0a45b364
...@@ -3631,7 +3631,6 @@ static qemuMonitorCallbacks callbacks = { ...@@ -3631,7 +3631,6 @@ static qemuMonitorCallbacks callbacks = {
static void static void
virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps) virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
{ {
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VHOST_NET);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NODEFCONFIG); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NODEFCONFIG);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_BOOT_MENU); virQEMUCapsSet(qemuCaps, QEMU_CAPS_BOOT_MENU);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_FSDEV); virQEMUCapsSet(qemuCaps, QEMU_CAPS_FSDEV);
......
...@@ -91,7 +91,7 @@ typedef enum { ...@@ -91,7 +91,7 @@ typedef enum {
/* 30 */ /* 30 */
X_QEMU_CAPS_RTC, /* The -rtc flag for clock options */ 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 */ X_QEMU_CAPS_RTC_TD_HACK, /* -rtc-td-hack available */
QEMU_CAPS_NO_HPET, /* -no-hpet flag is supported */ QEMU_CAPS_NO_HPET, /* -no-hpet flag is supported */
QEMU_CAPS_NO_KVM_PIT, /* -no-kvm-pit-reinjection supported */ QEMU_CAPS_NO_KVM_PIT, /* -no-kvm-pit-reinjection supported */
......
...@@ -8478,8 +8478,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, ...@@ -8478,8 +8478,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
memset(vhostfd, -1, vhostfdSize * sizeof(vhostfd[0])); memset(vhostfd, -1, vhostfdSize * sizeof(vhostfd[0]));
if (qemuInterfaceOpenVhostNet(def, net, qemuCaps, if (qemuInterfaceOpenVhostNet(def, net, vhostfd, &vhostfdSize) < 0)
vhostfd, &vhostfdSize) < 0)
goto cleanup; goto cleanup;
} }
......
...@@ -895,8 +895,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, ...@@ -895,8 +895,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
tapfd, &tapfdSize) < 0) tapfd, &tapfdSize) < 0)
goto cleanup; goto cleanup;
iface_connected = true; iface_connected = true;
if (qemuInterfaceOpenVhostNet(vm->def, net, priv->qemuCaps, if (qemuInterfaceOpenVhostNet(vm->def, net, vhostfd, &vhostfdSize) < 0)
vhostfd, &vhostfdSize) < 0)
goto cleanup; goto cleanup;
break; break;
...@@ -916,8 +915,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, ...@@ -916,8 +915,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
VIR_NETDEV_VPORT_PROFILE_OP_CREATE) < 0) VIR_NETDEV_VPORT_PROFILE_OP_CREATE) < 0)
goto cleanup; goto cleanup;
iface_connected = true; iface_connected = true;
if (qemuInterfaceOpenVhostNet(vm->def, net, priv->qemuCaps, if (qemuInterfaceOpenVhostNet(vm->def, net, vhostfd, &vhostfdSize) < 0)
vhostfd, &vhostfdSize) < 0)
goto cleanup; goto cleanup;
break; break;
...@@ -936,8 +934,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, ...@@ -936,8 +934,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
tapfd, tapfdSize) < 0) tapfd, tapfdSize) < 0)
goto cleanup; goto cleanup;
iface_connected = true; iface_connected = true;
if (qemuInterfaceOpenVhostNet(vm->def, net, priv->qemuCaps, if (qemuInterfaceOpenVhostNet(vm->def, net, vhostfd, &vhostfdSize) < 0)
vhostfd, &vhostfdSize) < 0)
goto cleanup; goto cleanup;
break; break;
......
...@@ -624,7 +624,6 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def, ...@@ -624,7 +624,6 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
int int
qemuInterfaceOpenVhostNet(virDomainDefPtr def, qemuInterfaceOpenVhostNet(virDomainDefPtr def,
virDomainNetDefPtr net, virDomainNetDefPtr net,
virQEMUCapsPtr qemuCaps,
int *vhostfd, int *vhostfd,
size_t *vhostfdSize) size_t *vhostfdSize)
{ {
...@@ -645,8 +644,7 @@ qemuInterfaceOpenVhostNet(virDomainDefPtr def, ...@@ -645,8 +644,7 @@ qemuInterfaceOpenVhostNet(virDomainDefPtr def,
/* If qemu doesn't support vhost-net mode (including the -netdev and /* If qemu doesn't support vhost-net mode (including the -netdev and
* -device command options), don't try to open the device. * -device command options), don't try to open the device.
*/ */
if (!(virQEMUCapsGet(qemuCaps, QEMU_CAPS_VHOST_NET) && if (!qemuDomainSupportsNicdev(def, net)) {
qemuDomainSupportsNicdev(def, net))) {
if (net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_VHOST) { if (net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_VHOST) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s", _("vhost-net is not supported with " "%s", _("vhost-net is not supported with "
......
...@@ -56,7 +56,6 @@ int qemuInterfaceBridgeConnect(virDomainDefPtr def, ...@@ -56,7 +56,6 @@ int qemuInterfaceBridgeConnect(virDomainDefPtr def,
int qemuInterfaceOpenVhostNet(virDomainDefPtr def, int qemuInterfaceOpenVhostNet(virDomainDefPtr def,
virDomainNetDefPtr net, virDomainNetDefPtr net,
virQEMUCapsPtr qemuCaps,
int *vhostfd, int *vhostfd,
size_t *vhostfdSize); size_t *vhostfdSize);
#endif /* __QEMU_INTERFACE_H__ */ #endif /* __QEMU_INTERFACE_H__ */
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='enable-kvm'/> <flag name='enable-kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='nodefconfig'/> <flag name='nodefconfig'/>
<flag name='boot-menu'/> <flag name='boot-menu'/>
<flag name='fsdev'/> <flag name='fsdev'/>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<selfvers>0</selfvers> <selfvers>0</selfvers>
<usedQMP/> <usedQMP/>
<flag name='kvm'/> <flag name='kvm'/>
<flag name='vhost-net'/>
<flag name='no-hpet'/> <flag name='no-hpet'/>
<flag name='no-kvm-pit'/> <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/> <flag name='pci-configfd'/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册