vhost-net requires to open one file descriptor for each TX/RX queue pair. At the moment kvmtool does not support multi-queue vhost: it issues all vhost ioctls on the first pair, and the other pairs are broken. Refuse the enable vhost when the user asks for multi-queue. Using multi-queue vhost-net also requires creating the tap interface with the 'multi_queue' parameter. Signed-off-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> --- virtio/net.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/virtio/net.c b/virtio/net.c index c4d20f22..02667176 100644 --- a/virtio/net.c +++ b/virtio/net.c @@ -741,6 +741,11 @@ static struct virtio_ops net_dev_virtio_ops = { static void virtio_net__vhost_init(struct kvm *kvm, struct net_dev *ndev) { + if (ndev->queue_pairs > 1) { + pr_warning("multiqueue is not supported with vhost yet"); + return; + } + ndev->vhost_fd = open("/dev/vhost-net", O_RDWR); if (ndev->vhost_fd < 0) die_perror("Failed openning vhost-net device"); -- 2.40.1