From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, mlureau@redhat.com, zhengxiang9@huawei.com,
lersek@redhat.com, pbonzini@redhat.com,
Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [Qemu-devel] [PATCH 0/4] vhost-user: notify backend with number of queues setup
Date: Fri, 12 Jan 2018 15:56:54 +0100 [thread overview]
Message-ID: <20180112145658.17121-1-maxime.coquelin@redhat.com> (raw)
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
next reply other threads:[~2018-01-12 14:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 14:56 Maxime Coquelin [this message]
2018-01-12 14:56 ` [Qemu-devel] [PATCH 1/4] vhost-user: fix multiple queue specification Maxime Coquelin
2018-01-16 3:00 ` Michael S. Tsirkin
2018-01-16 12:35 ` Maxime Coquelin
2018-01-12 14:56 ` [Qemu-devel] [PATCH 2/4] vhost-user: specify and implement VHOST_USER_SET_QUEUE_NUM request Maxime Coquelin
2018-01-16 3:05 ` Michael S. Tsirkin
2018-01-16 14:56 ` Maxime Coquelin
2018-01-12 14:56 ` [Qemu-devel] [PATCH 3/4] vhost-net: add vhost_net_set_queue_num helper Maxime Coquelin
2018-01-12 14:56 ` [Qemu-devel] [PATCH 4/4] virtio-net: notify backend with number of queue pairs setup Maxime Coquelin
2018-01-16 3:07 ` Michael S. Tsirkin
2018-01-16 14:16 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180112145658.17121-1-maxime.coquelin@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=lersek@redhat.com \
--cc=mlureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhengxiang9@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).