From: Jason Wang <jasowang@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: "Tiwei Bie" <tiwei.bie@intel.com>, "Cindy Lu" <lulu@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org,
"Raphael Norwitz" <raphael.norwitz@nutanix.com>,
kraxel@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Adrian Moreno Zapata" <amorenoz@redhat.com>,
"Changpeng Liu" <changpeng.liu@intel.com>
Subject: Re: VHOST_USER_PROTOCOL_F_VDPA
Date: Wed, 2 Sep 2020 15:42:42 +0800 [thread overview]
Message-ID: <0763f11f-513e-2115-5075-7b9291226e0c@redhat.com> (raw)
In-Reply-To: <20200821110822.GA205318@stefanha-x1.localdomain>
On 2020/8/21 下午7:08, Stefan Hajnoczi wrote:
> The first vDPA ioctls have been added to the vhost-user protocol and I
> wonder if it's time to fully change the vhost-user protocol's focus to
> providing a full VIRTIO device model like vDPA does.
>
> Initially vhost-user was just used for vhost-net. As a result it didn't
> need the full VIRTIO device model including the configuration space and
> device status register.
>
> Over the years device-specific messages were added to extend vhost-user
> to cover more of the VIRTIO device model. vhost-user-blk needed
> configuration space support, for example.
>
> The problem for VMMs and device backend implementors is that the
> protocol is currently positioned halfway between the original vhost-net
> approach and the full VIRTIO device model. Even if a VMM implements
> VHOST_USER_GET_CONFIG, it can only expect it to work with
> vhost-user-blk, not vhost-user-net. Similarly, a vhost-user-net device
> backend cannot implement VHOST_USER_GET_CONFIG and expect all VMMs to
> allow it to participate in configuration space emulation because
> existing VMMs won't send that message.
>
> The current approach where each device type uses a undocumented subset
> of vhost-user messages is really messy. VMM and device backend
> implementors have to look at existing implementations to know what is
> expected for a given device type. It would be nice to switch to the
> VIRTIO device model so that the VIRTIO specification can be used as the
> reference for how device types work.
>
> Now that vDPA is here and extends the kernel vhost ioctls with a full
> VIRTIO device model, it might be a good time to revise the vhost-user
> protocol.
>
> A vdpa-user protocol (or vhost-user 2.0) would replace the current mess
> with a full VIRTIO device model. Both VMMs and device backends would
> require changes to support this, but it would be a cleaner path forward
> for the vhost-user protocol.
>
> One way of doing this would be a new VHOST_USER_PROTOCOL_F_VDPA feature
> bit that indicates all the currently existing Linux vDPA ioctl messages
> are available. Legacy vhost-user messages with overlapping functionality
> must not be used when this bit is set. Most importantly, device backends
> need to implement the full VIRTIO device model, regardless of device
> type (net, blk, scsi, etc).
>
> The device type most affected by this change would be virtio-net. The
> other device types are already closer to the full VIRTIO device model.
>
> I wanted to share this idea in case someone is currently trying to
> figure out how to add more VIRTIO device model functionality to
> vhost-user.
Cc Adrian.
I think this makes sense.
Thanks
>
> Stefan
next prev parent reply other threads:[~2020-09-02 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 11:08 VHOST_USER_PROTOCOL_F_VDPA Stefan Hajnoczi
2020-09-02 7:42 ` Jason Wang [this message]
2020-09-10 8:55 ` VHOST_USER_PROTOCOL_F_VDPA Maxime Coquelin
2020-09-11 12:54 ` VHOST_USER_PROTOCOL_F_VDPA 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=0763f11f-513e-2115-5075-7b9291226e0c@redhat.com \
--to=jasowang@redhat.com \
--cc=amorenoz@redhat.com \
--cc=changpeng.liu@intel.com \
--cc=kraxel@redhat.com \
--cc=lulu@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=raphael.norwitz@nutanix.com \
--cc=stefanha@redhat.com \
--cc=tiwei.bie@intel.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).