From: Stefan Hajnoczi <stefanha@redhat.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
stratos-dev@op-lists.linaro.org,
"Oleksandr Tyshchenko" <olekstysh@gmail.com>,
xen-devel@lists.xen.org,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Juergen Gross" <jgross@suse.com>,
"Sebastien Boeuf" <sebastien.boeuf@intel.com>,
"Liu Jiang" <gerry@linux.alibaba.com>,
"Mathieu Poirier" <mathieu.poirier@linaro.org>,
virtio-dev@lists.oasis-open.org
Subject: Re: [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support
Date: Thu, 2 Mar 2023 07:08:42 -0500 [thread overview]
Message-ID: <20230302120842.GB2480875@fedora> (raw)
In-Reply-To: <20230302081907.pwt4nvz5buyt2dz3@vireshk-i7>
[-- Attachment #1: Type: text/plain, Size: 2194 bytes --]
On Thu, Mar 02, 2023 at 01:49:07PM +0530, Viresh Kumar wrote:
> On 01-03-23, 12:29, Stefan Hajnoczi wrote:
> > What is the advantage over defining separate messages? Separate messages
> > are cleaner and more typesafe.
>
> I thought we wanted to keep single message for one kind of functionality, which
> is mmap related quirks here. And so it would be better if we can reuse the same
> for next hypervisor which may need this.
>
> The value parameter is not fixed and is hypervisor specific, for Xen this is the
> domain id, for others it may mean something else.
mmap-related quirks have no parameters or behavior in common so there's
no advantage in sharing a single vhost-user protocol message. Sharing
the same message just makes it awkward to build and parse the message.
> > I don't have a concrete example, but was thinking of a guest that shares
> > memory with other guests (like the experimental virtio-vhost-user
> > device). Maybe there would be a scenario where some memory belongs to
> > one domain and some belongs to another (but has been mapped into the
> > first domain), and the vhost-user back-end needs to access both.
>
> These look tricky (and real) and I am not sure how we would want to handle
> these. Maybe wait until we have a real use-case ?
A way to deal with that is to include mmap information every time fds
are passed with a message instead of sending one global message at the
start of the vhost-user connection. This would allow each mmap to
associate extra information instead of forcing them all to use the same
information.
> > The other thing that comes to mind is that the spec must clearly state
> > which mmaps are affected by the Xen domain information. For example,
> > just mem table memory regions and not the
> > VHOST_USER_PROTOCOL_F_LOG_SHMFD feature?
>
> Maybe we can mention that only the mmap's performed via /dev/xen/privcmd and
> /dev/xen/gntdev files are affected by this ?
No, this doesn't explain when mmap must be performed via
/dev/xen/privcmd and /dev/xen/gntdev. The spec should be explicit about
this instead of assuming that the device implementer already knows this.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-03-02 12:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 15:47 [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support Stefan Hajnoczi
2023-03-01 16:31 ` Alex Bennée
2023-03-01 17:29 ` Stefan Hajnoczi
2023-03-02 8:19 ` Viresh Kumar
2023-03-02 12:08 ` Stefan Hajnoczi [this message]
2023-03-03 8:11 ` Viresh Kumar
-- strict thread matches above, loose matches on Subject: below --
2023-02-21 9:50 Viresh Kumar
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=20230302120842.GB2480875@fedora \
--to=stefanha@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=andrew.cooper3@citrix.com \
--cc=gerry@linux.alibaba.com \
--cc=jgross@suse.com \
--cc=mathieu.poirier@linaro.org \
--cc=mst@redhat.com \
--cc=olekstysh@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=sebastien.boeuf@intel.com \
--cc=stratos-dev@op-lists.linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=xen-devel@lists.xen.org \
/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