qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
	"John G Johnson" <john.g.johnson@oracle.com>,
	"mst@redhat.com" <mtsirkin@redhat.com>,
	"Janosch Frank" <frankja@linux.vnet.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Kirti Wankhede" <kwankhede@nvidia.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Yan Vugenfirer" <yan@daynix.com>,
	"Jag Raman" <jag.raman@oracle.com>,
	"Anup Patel" <anup@brainfault.org>,
	"Claudio Imbrenda" <imbrenda@linux.vnet.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Roman Kagan" <rkagan@virtuozzo.com>,
	"Felipe Franciosi" <felipe@nutanix.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Jens Freimann" <jfreimann@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Stefano Garzarella" <sgarzare@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Sergio Lopez" <slp@redhat.com>,
	"Kashyap Chamarthy" <kchamart@redhat.com>,
	"Darren Kenny" <darren.kenny@oracle.com>,
	"Liran Alon" <liran.alon@oracle.com>,
	"Thanos Makatos" <thanos.makatos@nutanix.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Halil Pasic" <pasic@linux.vnet.ibm.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"Christophe de Dinechin" <dinechin@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>, fam <fam@euphon.net>
Subject: Re: Out-of-Process Device Emulation session at KVM Forum 2020
Date: Thu, 29 Oct 2020 21:02:05 +0800	[thread overview]
Message-ID: <c4e5b631-1607-a0ec-ee88-6c5a9493e3de@redhat.com> (raw)
In-Reply-To: <CAJSP0QWrmNN1Ci-M-4WDFZBOGHyeZvF71utg0w2ajCbOLtynJw@mail.gmail.com>


On 2020/10/29 下午8:08, Stefan Hajnoczi wrote:
> Here are notes from the session:
>
> protocol stability:
>      * vhost-user already exists for existing third-party applications
>      * vfio-user is more general but will take more time to develop
>      * libvfio-user can be provided to allow device implementations
>
> management:
>      * Should QEMU launch device emulation processes?
>          * Nicer user experience
>          * Technical blockers: forking, hotplug, security is hard once
> QEMU has started running
>          * Probably requires a new process model with a long-running
> QEMU management process proxying QMP requests to the emulator process
>
> migration:
>      * dbus-vmstate
>      * VFIO live migration ioctls
>          * Source device can continue if migration fails
>          * Opaque blobs are transferred to destination, destination can
> fail migration if it decides the blobs are incompatible


I'm not sure this can work:

1) Reading something that is opaque to userspace is probably a hint of 
bad uAPI design
2) Did qemu even try to migrate opaque blobs before? It's probably a bad 
design of migration protocol as well.

It looks to me have a migration driver in qemu that can clearly define 
each byte in the migration stream is a better approach.


>          * How does the VMM share the migration data region with the
> device emulation process?
>              * The vfio-user protocol can trap or mmap
>      * device versioning (like versioned machine types) needed to pin
> the guest-visible device ABI
>      * Felipe will investigate live migration
>
> reconnection:
>      * How to support reconnection?
>          * QEMU has relatively little state of a vfio-user device
>          * vhost-user has more state so it's a little easier to
> reconnect or migrate


It could be even more easier, e.g for the inflight indices, we can 
design (or forcing to use in order) virtqueue carefully then we don't 
need any auxiliary data structure.

Thanks


>      * Build in reconnection and live migration from the start to avoid
> difficulties in the future
>      * Relationship between migration and reconnection?
>          * VFIO has a mechanism for saving/loading device state
>          * Lots of different reconnection cases that need to be thought through
>
> security & sandboxing:
>      * Goal: make it easy to lock down the process so developers don't
> need to reinvent sandboxing
>      * minijail
>          * in-process
>      * firecracker jailer
>      * bubblewrap
>          * launcher tool
>      * systemd-run
>          * launcher tool
>



  reply	other threads:[~2020-10-29 13:04 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 15:14 Out-of-Process Device Emulation session at KVM Forum 2020 Stefan Hajnoczi
2020-10-28  9:32 ` Thanos Makatos
2020-10-28 10:07   ` Thanos Makatos
2020-10-28 11:09 ` Michael S. Tsirkin
2020-10-29  8:21 ` Stefan Hajnoczi
2020-10-29 12:08 ` Stefan Hajnoczi
2020-10-29 13:02   ` Jason Wang [this message]
2020-10-29 13:06     ` Paolo Bonzini
2020-10-29 14:08     ` Stefan Hajnoczi
2020-10-29 14:31     ` Alex Williamson
2020-10-29 15:09       ` Jason Wang
2020-10-29 15:46         ` Alex Williamson
2020-10-29 16:10           ` Paolo Bonzini
2020-10-30  1:11           ` Jason Wang
2020-10-30  3:04             ` Alex Williamson
2020-10-30  6:21               ` Stefan Hajnoczi
2020-10-30  9:45                 ` Jason Wang
2020-10-30 11:13                   ` Stefan Hajnoczi
2020-10-30 12:07                     ` Jason Wang
2020-10-30 13:15                       ` Stefan Hajnoczi
2020-11-02  2:51                         ` Jason Wang
2020-11-02 10:13                           ` Stefan Hajnoczi
2020-11-03  7:52                             ` Jason Wang
2020-11-03 14:26                               ` Stefan Hajnoczi
2020-11-04  6:50                                 ` Gerd Hoffmann
2020-11-04  7:42                                   ` Michael S. Tsirkin
2020-10-31 21:49                     ` Michael S. Tsirkin
2020-11-01  8:26                       ` Paolo Bonzini
2020-11-02  2:54                         ` Jason Wang
2020-11-02  3:00                     ` Jason Wang
2020-11-02 10:27                       ` Stefan Hajnoczi
2020-11-02 10:34                         ` Michael S. Tsirkin
2020-11-02 14:59                           ` Stefan Hajnoczi
2020-10-30  7:51               ` Michael S. Tsirkin
2020-10-30  9:31               ` Jason Wang
2020-10-29 16:15     ` David Edmondson
2020-10-29 16:42       ` Daniel P. Berrangé
2020-10-29 17:47         ` Kirti Wankhede
2020-10-29 18:07           ` Paolo Bonzini
2020-10-30  1:15             ` Jason 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=c4e5b631-1607-a0ec-ee88-6c5a9493e3de@redhat.com \
    --to=jasowang@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=anup@brainfault.org \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=darren.kenny@oracle.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dinechin@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=fam@euphon.net \
    --cc=felipe@nutanix.com \
    --cc=frankja@linux.vnet.ibm.com \
    --cc=imbrenda@linux.vnet.ibm.com \
    --cc=jag.raman@oracle.com \
    --cc=jfreimann@redhat.com \
    --cc=john.g.johnson@oracle.com \
    --cc=kchamart@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwankhede@nvidia.com \
    --cc=kwolf@redhat.com \
    --cc=liran.alon@oracle.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mtsirkin@redhat.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkagan@virtuozzo.com \
    --cc=sgarzare@redhat.com \
    --cc=slp@redhat.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=thanos.makatos@nutanix.com \
    --cc=yan@daynix.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).