From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Hoffmann, Gerd" <kraxel@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
maxime.coquelin@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-3.2 01/11] vhost-user: define conventions for vhost-user backends
Date: Wed, 19 Dec 2018 10:42:07 -0500 [thread overview]
Message-ID: <20181219103112-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAJ+F1CJmT5O3x84upBDhvvCPCK5x51RP0TxBMsodLzVeQgC-vw@mail.gmail.com>
On Wed, Dec 19, 2018 at 12:01:59PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Wed, Dec 19, 2018 at 3:20 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Tue, Dec 18, 2018 at 10:35:05PM +0400, Marc-André Lureau wrote:
> > > Hi
> > >
> > > On Tue, Dec 11, 2018 at 10:56 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > >
> > > > On Tue, Dec 11, 2018 at 09:29:44AM +0000, Daniel P. Berrangé wrote:
> > > > > On Tue, Dec 11, 2018 at 08:42:41AM +0100, Hoffmann, Gerd wrote:
> > > > > > Hi,
> > > > > >
> > > > > > > Right. The main issue is that we need to make sure only
> > > > > > > in-tree devices are supported.
> > > > > >
> > > > > > Well, that is under debate right now, see:
> > > > > > https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg04912.html
> > > > >
> > > > > I've previously been against the idea of external plugins for QEMU,
> > > > > however, that was when the plugin was something that would be dlopen'd
> > > > > by QEMU. That would cause our internal ABI to be exposed to 3rd parties
> > > > > which is highly undesirable, even if they were open source to comply
> > > > > with the license needs.
> > > > >
> > > > > When the plugin is a completely isolated process communicating with a
> > > > > well defined protocol, it is not placing a significant burden on the
> > > > > QEMU developers' ongoing maintainence, nor has problems with license
> > > > > compliance. The main problem would come from debugging the combined
> > > > > system as the external process is essentially a black box from QEMU's
> > > > > POV. Downstream OS vendors are free to place restrictions on which
> > > > > backend processes they'd be willing to support with QEMU, and upstream
> > > > > is under no obligation to debug stuff beyond the QEMU boundary.
> > > > >
> > > > > We have already accepted that tradeoff with networking by supporting
> > > > > vhost-user and have externals impls like DPDK, so I don't see a
> > > > > compelling reason to try to restrict it for other vhost-user backends.
> > > >
> > > > OK seems to be more or less a rough concensus then.
> > > >
> > > > I wonder what's the approach wrt migration though.
> > >
> > > The series doesn't take care of migration.
> > >
> > > >
> > > > Even the compatibility story about vhost-user isn't
> > > > great, I would like to see something solid before
> > > > we allow that.
> > >
> > > To allow migration? vhost-user has partial support for migration
> > > (dirty memory tracking), and there is also "[PATCH v2 for-4.0 0/7]
> > > vhost-user-blk: Add support for backend reconnecting" - allowing the
> > > backend to store some state, if I understand correctly, which could be
> > > leveraged I guess...
> > >
> > > But I don't think we should block this series because migration isn't
> > > tackled here.
> > >
> > > thanks
> > >
> > >
> > > .
> >
> > How about blocking migration for now then?
>
> The device here (vhost-user-input) blocks migration (unmigratable = 1)
Right. But that device is just an excersize, right?
It bothers me that next device might not remember and
we will get a mess.
Could we make it somehow that if there is no vmsd
then migration is blocked?
> >
> > We need someone to work on a solution for cross version/device
> > compatibility, vhost net/blk without that is bad enough but at least we
> > have a feature bits, for random devices it would be very very bad.
>
> For now, if migration is somehow supported, it must be handled mostly
> by the qemu device, and the vhost-user backend must track dirty memory
> and be "stateless": *able to reconnect & resume where it left off).
>
> A backend shouldn't declare VHOST_USER_PROTOCOL_F_LOG_SHMFD if it can't do that.
>
> When a backend will have a state to migrate, we will have to implement
> a new feature. I assume that's what you are asking.
No, I am talking about a cross version/backend migration.
And it's such a boutique problem backends do not even
understand what it's about. A way to handle it
in the frontend is needed.
We also need a way to make sure incorrect backends do not
connect to incorrect devices, and we need a mechanism
that allows cross-version migration compatibility.
There's been a long discussion about cross-version
migration for vhost-user and I think Maxime had
a plan there. Maxime could you repost the
set of issues and what the plan is maybe?
> >
> >
> > > >
> > > > Are we happy to just block live migration?
> > > > For sure that's already the case with VFIO.
> > > >
> > > >
> > > > > > > vhost-user by design
> > > > > > > is for out of tree users. It needn't be hard,
> > > > > > > maybe it's enough to just make qemu launch these processes
> > > > > > > as opposed to connecting to them on command line.
> > > > > >
> > > > > > Not sure this is a good idea, with security being one of the motivating
> > > > > > factors to move device emulation to other processes. When libvirt
> > > > > > launches the processes it can place them in separate sandboxes ...
> > > > >
> > > > > Yep, libvirt already turns on seccomp policies which forbid QEMU from
> > > > > forking/execing anything, and we have no desire to go backwards here.
> > > > > Any external processes have to be launched by libvirt ahead of time.
> > > > >
> > > > >
> > > > > Regards,
> > > > > Daniel
> > > > > --
> > > > > |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> > > > > |: https://libvirt.org -o- https://fstop138.berrange.com :|
> > > > > |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
> > > >
> > >
> > >
> > > --
> > > Marc-André Lureau
>
>
>
> --
> Marc-André Lureau
next prev parent reply other threads:[~2018-12-19 15:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 12:42 [Qemu-devel] [PATCH for-3.2 00/11] vhost-user-backend & vhost-user-input Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 01/11] vhost-user: define conventions for vhost-user backends Marc-André Lureau
2018-11-26 20:57 ` Eric Blake
2018-12-10 14:29 ` Gerd Hoffmann
2018-12-10 18:36 ` Marc-André Lureau
2018-12-10 23:37 ` Michael S. Tsirkin
2018-12-11 7:42 ` Hoffmann, Gerd
2018-12-11 9:29 ` Daniel P. Berrangé
2018-12-11 18:56 ` Michael S. Tsirkin
2018-12-18 18:35 ` Marc-André Lureau
2018-12-18 23:20 ` Michael S. Tsirkin
2018-12-19 8:01 ` Marc-André Lureau
2018-12-19 15:42 ` Michael S. Tsirkin [this message]
2018-12-20 12:40 ` Marc-André Lureau
2018-12-20 16:33 ` Michael S. Tsirkin
2019-01-08 13:23 ` Marc-André Lureau
2019-01-09 8:45 ` Hoffmann, Gerd
2019-01-09 20:53 ` Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 02/11] vhost-user: simplify vhost_user_init/vhost_user_cleanup Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 03/11] libvhost-user: exit by default on VHOST_USER_NONE Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 04/11] vhost-user: wrap some read/write with retry handling Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 05/11] Add vhost-user-backend Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 06/11] vhost-user: split vhost_user_read() Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 07/11] vhost-user: add vhost_user_input_get_config() Marc-André Lureau
2018-12-10 14:26 ` Gerd Hoffmann
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 08/11] libvhost-user-glib: export vug_source_new() Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 09/11] libvhost-user: add vu_queue_unpop() Marc-André Lureau
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 10/11] Add vhost-user-input-pci Marc-André Lureau
2018-12-10 14:26 ` Gerd Hoffmann
2018-11-26 12:42 ` [Qemu-devel] [PATCH for-3.2 11/11] contrib: add vhost-user-input Marc-André Lureau
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=20181219103112-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=maxime.coquelin@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).