qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Albert Esteve <aesteve@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, slp@redhat.com, stefanha@redhat.com,
	jasowang@redhat.com, Albert Esteve <aesteve@redhat.com>
Subject: [RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests
Date: Thu, 30 May 2024 17:22:22 +0200	[thread overview]
Message-ID: <20240530152223.780232-1-aesteve@redhat.com> (raw)

Hi all,

This is an early attempt to have backends
support dynamic fd mapping into shared
memory regions. As such, there are a few
things that need settling, so I wanted to
post this first to have some early feedback.

The usecase for this is, e.g., to support
vhost-user-gpu RESOURCE_BLOB operations,
or DAX Window request for virtio-fs. In
general, any operation where a backend
would need to mmap an fd to a shared
memory so that the guest can access it.
The request will be processed by the VMM,
that will, in turn, trigger a mmap with
the instructed parameters (i.e., shmid,
shm_offset, fd_offset, fd, lenght).

As there are already a couple devices
that could benefit of such a feature,
and more could require it in the future,
my intention was to make it generic.

To that end, I declared the shared
memory region list in `VirtIODevice`.
I could add a couple commodity
functions to add new regions to the list,
so that the devices can use them. But
I wanted to gather some feedback before
refining it further, as I am probably
missing some required steps/or security
concerns that I am not taking into account.

Albert Esteve (1):
  vhost-user: add shmem mmap request

 docs/interop/vhost-user.rst |  23 ++++++++
 hw/virtio/vhost-user.c      | 106 ++++++++++++++++++++++++++++++++++++
 hw/virtio/virtio.c          |   2 +
 include/hw/virtio/virtio.h  |   3 +
 4 files changed, 134 insertions(+)

-- 
2.44.0



             reply	other threads:[~2024-05-30 15:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 15:22 Albert Esteve [this message]
2024-05-30 15:22 ` [RFC PATCH 1/1] vhost-user: add shmem mmap request Albert Esteve
2024-06-04 18:54   ` Stefan Hajnoczi
2024-06-05  8:13     ` Albert Esteve
2024-06-05 14:28       ` Stefan Hajnoczi
2024-06-05 15:19         ` Stefan Hajnoczi
2024-06-05 16:02           ` David Hildenbrand
2024-06-05 16:57             ` Stefan Hajnoczi
2024-06-26  7:53         ` Albert Esteve
2024-06-26 13:31           ` Stefan Hajnoczi
2024-06-04 18:16 ` [RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests Stefan Hajnoczi
2024-06-05  7:24   ` Albert Esteve
2024-06-05 11:16     ` Stefan Hajnoczi
2024-06-05 11:50       ` Albert Esteve

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=20240530152223.780232-1-aesteve@redhat.com \
    --to=aesteve@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=slp@redhat.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).