From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, raphael.norwitz@nutanix.com,
qemu-block@nongnu.org, stefanha@redhat.com, mst@redhat.com
Subject: [PATCH 0/3] vhost-user: Fixes for VHOST_USER_ADD/REM_MEM_REG
Date: Thu, 7 Apr 2022 15:36:54 +0200 [thread overview]
Message-ID: <20220407133657.155281-1-kwolf@redhat.com> (raw)
While implementing a vhost-user-blk driver for libblkio, I found some
problems with VHOST_USER_ADD/REM_MEM_REG both in the spec and in the
implementations in QEMU and libvhost-user that this series addresses.
I also noticed that you can use REM_MEM_REG or SET_MEM_TABLE to unmap a
memory region that is still in use (e.g. a block I/O request using
addresses from the region has been started, but not completed yet),
which is not great. I'm not sure how to fix this best, though.
We would have to wait for these requests to complete (maybe introduce a
refcount and wait for it to drop to zero), but waiting seems impossible
in libvhost-user because it doesn't have any main loop integration. Just
failing the memory region removal would be safe, but potentially a
rather awkward interface because clients would have to implement some
retry logic.
Kevin Wolf (3):
docs/vhost-user: Clarifications for VHOST_USER_ADD/REM_MEM_REG
libvhost-user: Fix extra vu_add/rem_mem_reg reply
vhost-user: Don't pass file descriptor for VHOST_USER_REM_MEM_REG
docs/interop/vhost-user.rst | 17 +++++++++++++++++
hw/virtio/vhost-user.c | 2 +-
subprojects/libvhost-user/libvhost-user.c | 17 +++++++----------
3 files changed, 25 insertions(+), 11 deletions(-)
--
2.35.1
next reply other threads:[~2022-04-07 13:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 13:36 Kevin Wolf [this message]
2022-04-07 13:36 ` [PATCH 1/3] docs/vhost-user: Clarifications for VHOST_USER_ADD/REM_MEM_REG Kevin Wolf
2022-04-09 0:02 ` Raphael Norwitz
2022-04-07 13:36 ` [PATCH 2/3] libvhost-user: Fix extra vu_add/rem_mem_reg reply Kevin Wolf
2022-04-08 23:51 ` Raphael Norwitz
2022-04-07 13:36 ` [PATCH 3/3] vhost-user: Don't pass file descriptor for VHOST_USER_REM_MEM_REG Kevin Wolf
2022-04-08 23:55 ` Raphael Norwitz
2022-04-12 8:40 ` [PATCH 0/3] vhost-user: Fixes for VHOST_USER_ADD/REM_MEM_REG Stefan Hajnoczi
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=20220407133657.155281-1-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=raphael.norwitz@nutanix.com \
--cc=stefanha@redhat.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).