qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Wei Wang <wei.w.wang@intel.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] vhost-pci and virtio-vhost-user
Date: Fri, 12 Jan 2018 10:37:36 +0000	[thread overview]
Message-ID: <20180112103736.GF7356@stefanha-x1.localdomain> (raw)
In-Reply-To: <5A585930.1030009@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2493 bytes --]

On Fri, Jan 12, 2018 at 02:44:00PM +0800, Wei Wang wrote:
> On 01/11/2018 05:56 PM, Stefan Hajnoczi wrote:
> > On Thu, Jan 11, 2018 at 6:31 AM, Wei Wang <wei.w.wang@intel.com> wrote:
> > > On 01/11/2018 12:14 AM, Stefan Hajnoczi wrote:
> > > Without above two, the solution already works well, so I'm not sure why would we need the above two from functionality point of view.
> > The "[PATCH v3 0/7] Vhost-pci for inter-VM communication" series is
> > incomplete.  It is a subset of vhost-user-net and it works only for
> > poll-mode drivers.  It's the requirements that haven't been covered by
> > the vhost-pci patch series yet that make me prefer the
> > virtio-vhost-user approach.
> > 
> > The virtio device design needs to be capable of supporting the rest of
> > vhost-user functionality in the future.  Once the code is merged in
> > QEMU and DPDK it will be very difficult to make changes to the virtio
> > device.
> 
> This is how virtio works. A new feature with a new feature bit.

Although it is possible to add a feature bit that radically changes the
virtio device's interface, the existing driver software would need to be
largely rewritten - all the way up to the net, scsi, blk, etc devices.

We cannot easily migrate between the vhost-pci to virtio-vhost-user
approaches later.

> Now, we let
> the guest driver join the vhost-user negotiation (including feature
> negotiation), the default device/driver feature negotiation is free to use.
> I'm thinking if it is worthwhile to do some kind of mediated passthrough,
> which passes the selected messages only. Because many messages are not
> necessary to be passed down (e.g. VHOST_USER_SEND_RARP is not needed for
> simple VM-to-VM communication), though might be safe to do. I plan to see
> your full passthrough code first, and see if changing to mediated
> passthrough would be simpler.

I expect vhost-pci to require fewer code changes.  If you judge
"simpler" just by the patch count or size, then vhost-pci will win.

The reason for that is virtio-vhost-user integrates with librte_vhost.
This requires refactoring librte_vhost to support multiple transports.

I think the virtio-vhost-user end result is worth it though: vhost
devices like examples/vhost/ and examples/vhost/scsi/ will work with
both AF_UNIX and virtio-vhost-user.  This makes it simpler for users and
vhost device developers - you only have one implementation of net, scsi,
blk, etc devices.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2018-01-12 10:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 16:14 [Qemu-devel] vhost-pci and virtio-vhost-user Stefan Hajnoczi
2018-01-11  6:31 ` Wei Wang
2018-01-11  9:56   ` Stefan Hajnoczi
2018-01-12  6:44     ` Wei Wang
2018-01-12 10:37       ` Stefan Hajnoczi [this message]
2018-01-14  3:36         ` Wang, Wei W
2018-01-15 14:02           ` Stefan Hajnoczi
2018-01-11 10:57 ` Jason Wang
2018-01-11 15:23   ` Stefan Hajnoczi
2018-01-12  3:32     ` Jason Wang
2018-01-12  5:20       ` Yang, Zhiyong
2018-01-15  3:09         ` Jason Wang
2018-01-12 10:18       ` Stefan Hajnoczi
2018-01-15  6:56         ` Jason Wang
2018-01-15  7:59           ` Wei Wang
2018-01-15  8:34             ` Jason Wang
2018-01-15 10:43               ` Wei Wang
2018-01-16  5:33                 ` Jason Wang
2018-01-17  8:44                   ` Wei Wang
2018-01-15 13:56           ` Stefan Hajnoczi
2018-01-16  5:41             ` Jason Wang
2018-01-18 10:51               ` Stefan Hajnoczi
2018-01-18 11:51                 ` Jason Wang
2018-01-19 17:20                   ` Stefan Hajnoczi
2018-01-22  3:54                     ` Jason Wang
2018-01-23 11:52                       ` Stefan Hajnoczi
2018-01-15  7:56         ` Wei Wang

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=20180112103736.GF7356@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=wei.w.wang@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).