Skip to content

vhost-user: warn when guest RAM is not shared

Stefan Hajnoczi qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 4 repliesIn review
  2. v23 patches 0 repliesSuperseded
  3. v13 patches 8 repliesSuperseded

Changes in v3 from the cover letter

* Rebased

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tests/qtest/vhost-user-test: use share=on with memfdtests/qtest/vhost-user-test.c+1 -11 reply
2/3memory: add memory_region_is_mapped_shared()include/exec/memory.h softmmu/memory.c+17 -01 reply
3/3vhost-user: warn when guest RAM is not sharedhw/virtio/vhost-user.c+16 -40 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMarc-André LureauThomas HuthPankaj Gupta
1/3R-b A-b R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/3] vhost-user: warn when guest RAM is not shared

v3:
* Rebased
v2:
* Clarify that object-memory-memfd enables share=on by default [Marc-André]
* Rebased

vhost-user requires -object memory-backend-*,share=on option so that QEMU uses mmap(MAP_SHARED) on guest RAM that is shared with the vhost-user device backend process. This is needed so the QEMU process sees changes made by the vhost-user device backend process, and vice versa.

Today QEMU and the vhost-user device process will start up and then fail with a confusing error message if the user forgot to specify share=on.

This patch series adds a warning letting the user know that share=on is required.

Stefan Hajnoczi (3):
tests/qtest/vhost-user-test: use share=on with memfd
memory: add memory_region_is_mapped_shared()
vhost-user: warn when guest RAM is not shared

 include/exec/memory.h         | 11 +++++++++++
 hw/virtio/vhost-user.c        | 20 ++++++++++++++++----
 softmmu/memory.c              |  6 ++++++
 tests/qtest/vhost-user-test.c |  2 +-
 4 files changed, 34 insertions(+), 5 deletions(-)
Signature · 1 line
2.31.1