From: Boris Fiuczynski Date: Wed, 6 May 2015 14:07:40 +0000 (+0200) Subject: qemu: multiqueue for ccw devices X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=808e771e835a5ae6278809485185136b5f8705ec;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git qemu: multiqueue for ccw devices Allow ccw devices to be used with multiqueues. ccw provides a one to one relation of fds to queues and does not support the vectors option. Signed-off-by: Boris Fiuczynski Reviewed-by: Matthew Rosato Reviewed-by: Daniel Hansel Reviewed-by: Cornelia Huck --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 68844fa97..fe4622ef7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5129,9 +5129,17 @@ qemuBuildNicDevStr(virDomainDefPtr def, } } if (usingVirtio && vhostfdSize > 1) { - /* As advised at http://www.linux-kvm.org/page/Multiqueue - * we should add vectors=2*N+2 where N is the vhostfdSize */ - virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2); + if (net->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) { + /* ccw provides a one to one relation of fds to queues and + * does not support the vectors option + */ + virBufferAddLit(&buf, ",mq=on"); + } else { + /* As advised at http://www.linux-kvm.org/page/Multiqueue + * we should add vectors=2*N+2 where N is the vhostfdSize + */ + virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2); + } } if (vlan == -1) virBufferAsprintf(&buf, ",netdev=host%s", net->info.alias);