From: Cornelia Huck <cohuck@redhat.com>
To: Jason Gunthorpe <jgg@nvidia.com>,
Alex Williamson <alex.williamson@redhat.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"farman@linux.ibm.com" <farman@linux.ibm.com>,
"mjrosato@linux.ibm.com" <mjrosato@linux.ibm.com>,
"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
Yishai Hadas <yishaih@nvidia.com>
Subject: Re: [PATCH RFC] vfio: Revise and update the migration uAPI description
Date: Wed, 19 Jan 2022 12:40:43 +0100 [thread overview]
Message-ID: <87sftkc5s4.fsf@redhat.com> (raw)
In-Reply-To: <20220118210048.GG84788@nvidia.com>
On Tue, Jan 18 2022, Jason Gunthorpe <jgg@nvidia.com> wrote:
> On Tue, Jan 18, 2022 at 12:55:22PM -0700, Alex Williamson wrote:
>> At some point later hns support is ready, it supports the migration
>> region, but migration fails with all existing userspace written to the
>> below spec. I can't imagine that a device advertising migration, but it
>> being essentially guaranteed to fail is a viable condition and we can't
>> retroactively add this proposed ioctl to existing userspace binaries.
>> I think our recourse here would be to rev the migration sub-type again
>> so that userspace that doesn't know about devices that lack P2P won't
>> enable migration support.
>
> Global versions are rarely a good idea. What happens if we have three
> optional things, what do you set the version to in order to get
> maximum compatibility?
>
> For the scenario you describe it is much better for qemu to call
> VFIO_DEVICE_MIG_ARC_SUPPORTED on every single transition it intends to
> use when it first opens the device. If any fail then it can deem the
> device as having some future ABI and refuse to use it with migration.
Userspace having to discover piecemeal what is and what isn't supported
does not sound like a very good idea. It should be able to figure that
out in one go.
>
>> So I think this ends up being a poor example of how to extend the uAPI.
>> An opt-out for part of the base specification is hard, it's much easier
>> to opt-in P2P as a feature.
>
> I'm not sure I understand this 'base specification'.
>
> My remark was how we took current qemu as an ABI added P2P to the
> specification and defined it in a way that is naturally backwards
> compatible and is still well specified.
I agree with Alex that this approach, while clever, is not a good way to
extend the uapi.
What about leaving the existing migration region alone (in order to not
break whatever exists out there) and add a v2 migration region that
defines a base specification (the mandatory part that everyone must
support) and a capability mechanism to allow for extensions like P2P?
The base specification should really only contain what everybody can and
will need to implement; if we know that mlx5 will need more, we simply
need to define those additional features right from the start.
(I do not object to using a FSM for describing the state transitions; I
have not reviewed it so far.)
next prev parent reply other threads:[~2022-01-19 11:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 19:35 [PATCH RFC] vfio: Revise and update the migration uAPI description Jason Gunthorpe
2022-01-18 14:04 ` Yishai Hadas
2022-01-18 19:55 ` Alex Williamson
2022-01-18 21:00 ` Jason Gunthorpe
2022-01-19 11:40 ` Cornelia Huck [this message]
2022-01-19 12:44 ` Jason Gunthorpe
2022-01-19 13:42 ` Jason Gunthorpe
2022-01-19 14:59 ` Jason Gunthorpe
2022-01-19 15:32 ` Alex Williamson
2022-01-19 15:40 ` Jason Gunthorpe
2022-01-19 16:06 ` Alex Williamson
2022-01-19 16:38 ` Jason Gunthorpe
2022-01-19 17:02 ` Alex Williamson
2022-01-20 0:19 ` Jason Gunthorpe
2022-01-24 10:24 ` Cornelia Huck
2022-01-24 17:57 ` Jason Gunthorpe
2022-01-19 13:18 ` Jason Gunthorpe
2022-01-25 3:55 ` Tian, Kevin
2022-01-25 13:11 ` Jason Gunthorpe
2022-01-26 1:17 ` Tian, Kevin
2022-01-26 1:32 ` Jason Gunthorpe
2022-01-26 1:49 ` Tian, Kevin
2022-01-26 12:14 ` Jason Gunthorpe
2022-01-26 15:33 ` Jason Gunthorpe
2022-01-27 0:38 ` Tian, Kevin
2022-01-27 0:48 ` Jason Gunthorpe
2022-01-27 1:03 ` Tian, Kevin
2022-01-27 0:53 ` Tian, Kevin
2022-01-27 1:10 ` Jason Gunthorpe
2022-01-27 1:21 ` Tian, Kevin
2022-01-26 1:35 ` Jason Gunthorpe
2022-01-26 1:58 ` Tian, Kevin
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=87sftkc5s4.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=farman@linux.ibm.com \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=yishaih@nvidia.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).