This series introduces a new vhost-user protocol request for QEMU to notify the backend with the number of queues setup by the guest driver.
When the user backend cannot add queues dynamically (i.e. once the port is running), it waits for all queues to be initialized. Problem is that QEMU sends messages for all queues declared in command line, even the ones no setup by the guest driver. Without fix from Zheng Xiang [0] that doesn't start queues that haven't been setup by the guest, it ends up corrupting memory around GPA 0 as SET_VRING_ADDR is sent with uninitialized ring addresses. With the fix, the DPDK backend would be stuck forever, waiting for unused queues to be setup, which won't happen. Note that these problems are met neither with virtio-net Linux driver, nor DPDK's Virtio PMD, because these drivers always setup all queues provided by QEMU, even if they doesn't use all of them. However, the problem can be reproduced with Windows guest, when QEMU declares more queue pairs than vcpus. In this case, the Windows virtio-net driver only setup as much queue pairs as vcpus. [0]: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg02484.html Maxime Coquelin (4): vhost-user: fix multiple queue specification vhost-user: specify and implement VHOST_USER_SET_QUEUE_NUM request vhost-net: add vhost_net_set_queue_num helper virtio-net: notify backend with number of queue pairs setup docs/interop/vhost-user.txt | 22 +++++++++++++++++++--- hw/net/vhost_net.c | 17 +++++++++++++++++ hw/net/virtio-net.c | 5 +++++ hw/virtio/vhost-user.c | 24 ++++++++++++++++++++++++ include/hw/virtio/vhost-backend.h | 3 +++ include/net/vhost_net.h | 1 + 6 files changed, 69 insertions(+), 3 deletions(-) -- 2.14.3