From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: "John G Johnson" <john.g.johnson@oracle.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
mtsirkin@redhat.com, "Daniel P. Berrangé" <berrange@redhat.com>,
quintela@redhat.com, "Jason Wang" <jasowang@redhat.com>,
"Zeng, Xin" <xin.zeng@intel.com>,
qemu-devel@nongnu.org, "Yan Zhao" <yan.y.zhao@intel.com>,
"Kirti Wankhede" <kwankhede@nvidia.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Felipe Franciosi" <felipe@nutanix.com>,
"Christophe de Dinechin" <dinechin@redhat.com>,
"Thanos Makatos" <thanos.makatos@nutanix.com>
Subject: Re: [RFC v3] VFIO Migration
Date: Mon, 16 Nov 2020 14:38:12 +0000 [thread overview]
Message-ID: <20201116143812.GF96297@stefanha-x1.localdomain> (raw)
In-Reply-To: <20201111154159.GG3232@work-vm>
[-- Attachment #1: Type: text/plain, Size: 3722 bytes --]
On Wed, Nov 11, 2020 at 03:41:59PM +0000, Dr. David Alan Gilbert wrote:
> * Stefan Hajnoczi (stefanha@redhat.com) wrote:
> > On Wed, Nov 11, 2020 at 12:56:26PM +0000, Dr. David Alan Gilbert wrote:
> > > * Stefan Hajnoczi (stefanha@redhat.com) wrote:
> > > > Orchestrating Migrations
> > > > ------------------------
> > > > In order to migrate a device a *migration parameter list* must first be built
> > > > on the source. Each migration parameter is added to the list if it is in
> > > > effect. For example, the migration parameter list for a device with
> > > > new-feature=off,num-queues=4 would be num-queues=4 if the new-feature migration
> > > > parameter was introduced with the off value disabling its effect.
> > >
> > > What component builds that list (i.e. what component needs to know the
> > > history that new-feature=off was the default - ah I think you answer
> > > that below).
> >
> > Yep. Thanks for noting this. I'll need to reorder things so it is clear.
> >
> > > > The following conditions must be met to establish migration compatibility:
> > > >
> > > > 1. The source and destination device model strings match.
> > > >
> > > > 2. Each migration parameter name from the migration parameter list is supported
> > > > by the destination. For example, the destination supports the num-queues
> > > > migration parameter.
> > > >
> > > > 3. Each migration parameter value from the migration parameter list is
> > > > supported by the destination. For example, the destination supports
> > > > num-queues=4.
> > >
> > > Hmm, are combinations of parameter checks needed - i.e. is it possible
> > > that a destination supports num-queues=4 and new-feature=on/off -
> > > but only supports new-feature=on when num-queues>2 ?
> >
> > Yes, it's possible but cannot be expressed in the migration info JSON.
> >
> > We need to choose a level of expressiveness that will be useful enough
> > without being complex. In the extreme the migration info would contain
> > Turing complete validation expressions (e.g. JavaScript) so that any
> > relationship can be expressed, but I doubt that complexity is needed.
> > The other extreme is just booleans and (opaque) strings for maximum
> > simplicity.
> >
> > If the syntax is not expressive enough then it's impossible to check
> > migration compatibility without actually creating a new device instance
> > on the destination. Daniel Berrange raised the requirement of checking
> > migration compatibility without creating the device since this helps
> > with selecting a migration destination.
>
> Right, but my worry isn't the JSON description, it's the set of 3
> conditions above; they need to state that only some combinations need to
> be valid.
Yes, the proposed syntax is simply not expressive enough. The migration
compatibility check will pass and then the destination will refuse to
set up the device (before the device state is transferred).
Any suggestions for a syntax without full-blown arithmetic and logic
expressions?
> > Any ideas for a better syntax?
>
> I'd be happy with a --param name=value repeatedly, but also know that
> some option parsers don't like that.
Another wart, Sphinx considers repeated options an error so you cannot
document options using rST option syntax. I remember having this problem
when documenting virtiofsd's command-line options :).
If something comes to mind please let me know. I'm not set on a
particular syntax, but I'd like to choose the one that is both
human-friendly and compatible with option parsers while avoiding
namespace collisions with the device implementation's own options.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-11-16 14:39 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 9:53 [RFC v3] VFIO Migration Stefan Hajnoczi
2020-11-10 11:12 ` Paolo Bonzini
2020-11-11 14:36 ` Stefan Hajnoczi
2020-11-11 15:48 ` Daniel P. Berrangé
2020-11-12 15:26 ` Cornelia Huck
2020-11-16 10:48 ` Stefan Hajnoczi
2020-11-16 11:15 ` Stefan Hajnoczi
2020-11-16 11:41 ` Daniel P. Berrangé
2020-11-16 12:03 ` Michael S. Tsirkin
2020-11-16 12:05 ` Daniel P. Berrangé
2020-11-16 12:34 ` Michael S. Tsirkin
2020-11-16 12:45 ` Daniel P. Berrangé
2020-11-16 12:51 ` Michael S. Tsirkin
2020-11-16 12:48 ` Gerd Hoffmann
2020-11-16 12:54 ` Michael S. Tsirkin
2020-11-16 12:06 ` Michael S. Tsirkin
2020-11-10 20:14 ` Alex Williamson
2020-11-11 11:48 ` Cornelia Huck
2020-11-11 15:14 ` Stefan Hajnoczi
2020-11-11 15:35 ` Cornelia Huck
2020-11-16 11:02 ` Stefan Hajnoczi
2020-11-16 13:52 ` Cornelia Huck
2020-11-16 17:30 ` Alex Williamson
2020-11-24 17:24 ` Dr. David Alan Gilbert
2020-11-11 15:10 ` Stefan Hajnoczi
2020-11-11 15:28 ` Cornelia Huck
2020-11-16 11:36 ` Stefan Hajnoczi
2020-11-11 11:19 ` Cornelia Huck
2020-11-11 15:35 ` Stefan Hajnoczi
2020-11-11 12:56 ` Dr. David Alan Gilbert
2020-11-11 15:34 ` Stefan Hajnoczi
2020-11-11 15:41 ` Dr. David Alan Gilbert
2020-11-16 14:38 ` Stefan Hajnoczi [this message]
2020-11-17 9:44 ` Michael S. Tsirkin
2020-12-01 13:17 ` Stefan Hajnoczi
2020-11-11 16:18 ` Thanos Makatos
2020-11-16 15:24 ` Stefan Hajnoczi
2020-11-24 17:29 ` Dr. David Alan Gilbert
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=20201116143812.GF96297@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=dinechin@redhat.com \
--cc=felipe@nutanix.com \
--cc=jasowang@redhat.com \
--cc=john.g.johnson@oracle.com \
--cc=kevin.tian@intel.com \
--cc=kraxel@redhat.com \
--cc=kwankhede@nvidia.com \
--cc=mtsirkin@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=thanos.makatos@nutanix.com \
--cc=xin.zeng@intel.com \
--cc=yan.y.zhao@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).