From: Yan Zhao <yan.y.zhao@intel.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
"cjia@nvidia.com" <cjia@nvidia.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"libvir-list@redhat.com" <libvir-list@redhat.com>,
"Zhengxiao.zx@alibaba-inc.com" <Zhengxiao.zx@alibaba-inc.com>,
"shuangtai.tst@alibaba-inc.com" <shuangtai.tst@alibaba-inc.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"kwankhede@nvidia.com" <kwankhede@nvidia.com>,
"eauger@redhat.com" <eauger@redhat.com>,
"Liu, Yi L" <yi.l.liu@intel.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"Yang, Ziye" <ziye.yang@intel.com>,
"mlevitsk@redhat.com" <mlevitsk@redhat.com>,
"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
"aik@ozlabs.ru" <aik@ozlabs.ru>,
"felipe@nutanix.com" <felipe@nutanix.com>,
"Ken.Xue@amd.com" <Ken.Xue@amd.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
"eskultet@redhat.com" <eskultet@redhat.com>,
"Zeng, Xin" <xin.zeng@intel.com>,
"zhenyuw@linux.intel.com" <zhenyuw@linux.intel.com>,
"dinechin@redhat.com" <dinechin@redhat.com>,
"intel-gvt-dev@lists.freedesktop.org"
<intel-gvt-dev@lists.freedesktop.org>,
"Liu, Changpeng" <changpeng.liu@intel.com>,
"berrange@redhat.com" <berrange@redhat.com>,
Cornelia Huck <cohuck@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Wang, Zhi A" <zhi.a.wang@intel.com>,
"jonathan.davies@nutanix.com" <jonathan.davies@nutanix.com>,
"He, Shaopeng" <shaopeng.he@intel.com>
Subject: Re: [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration
Date: Tue, 9 Jun 2020 20:37:31 -0400 [thread overview]
Message-ID: <20200610003731.GA13961@joy-OptiPlex-7040> (raw)
In-Reply-To: <20200605143950.GG2897@work-vm>
On Fri, Jun 05, 2020 at 03:39:50PM +0100, Dr. David Alan Gilbert wrote:
> > > > I tried to simplify the problem a bit, but we keep going backwards. If
> > > > the requirement is that potentially any source device can migrate to any
> > > > target device and we cannot provide any means other than writing an
> > > > opaque source string into a version attribute on the target and
> > > > evaluating the result to determine compatibility, then we're requiring
> > > > userspace to do an exhaustive search to find a potential match. That
> > > > sucks.
> > >
hi Alex and Dave,
do you think it's good for us to put aside physical devices and mdev aggregation
for the moment, and use Alex's original idea that
+ Userspace should regard two mdev devices compatible when ALL of below
+ conditions are met:
+ (0) The mdev devices are of the same type
+ (1) success when reading from migration_version attribute of one mdev device.
+ (2) success when writing migration_version string of one mdev device to
+ migration_version attribute of the other mdev device.
and what about adding another sysfs attribute for vendors to put
recommended migration compatible device type. e.g.
#cat /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_8/migration_compatible_devices
parent id: 8086 591d
mdev_type: i915-GVTg_V5_8
vendors are free to define the format and conent of this migration_compatible_devices
and it's even not to be a full list.
before libvirt or user to do live migration, they have to read and test
migration_version attributes of src/target devices to check migration compatibility.
Thanks
Yan
> > > Why is the mechanism a 'write and test' why isn't it a 'write and ask'?
> > > i.e. the destination tells the driver what type it's received from the
> > > source, and the driver replies with a set of compatible configurations
> > > (in some preferred order).
> >
> > A 'write and ask' interface would imply some sort of session in order
> > to not be racy with concurrent users. More likely this would imply an
> > ioctl interface, which I don't think we have in sysfs. Where do we
> > host this ioctl?
>
> Or one fd?
> f=open()
> write(f, "The ID I want")
> do {
> read(f, ...) -> The IDs we're offering that are compatible
> } while (!eof)
>
> > > It's also not clear to me why the name has to be that opaque;
> > > I agree it's only got to be understood by the driver but that doesn't
> > > seem to be a reason for the driver to make it purposely obfuscated.
> > > I wouldn't expect a user to be able to parse it necessarily; but would
> > > expect something that would be useful for an error message.
> >
> > If the name is not opaque, then we're going to rat hole on the format
> > and the fields and evolving that format for every feature a vendor
> > decides they want the user to be able to parse out of the version
> > string. Then we require a full specification of the string in order
> > that it be parsed according to a standard such that we don't break
> > users inferring features in subtly different ways.
> >
> > This is a lot like the problems with mdev description attributes,
> > libvirt complains they can't use description because there's no
> > standard formatting, but even with two vendors describing the same class
> > of device we don't have an agreed set of things to expose in the
> > description attribute. Thanks,
>
> I'm not suggesting anything in anyway machine parsable; just something
> human readable that you can present in a menu/choice/configuration/error
> message. The text would be down to the vendor, and I'd suggest it start
> with the vendor name just as a disambiguator and to make it obvious when
> we get it grossly wrong.
>
> Dave
>
> > Alex
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
next prev parent reply other threads:[~2020-06-10 0:48 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 5:52 [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration Yan Zhao
2020-04-13 5:54 ` [PATCH v5 1/4] vfio/mdev: add migration_version attribute for mdev (under mdev_type node) Yan Zhao
2020-04-15 7:28 ` Erik Skultety
2020-04-15 8:58 ` Yan Zhao
2020-04-13 5:54 ` [PATCH v5 2/4] drm/i915/gvt: export migration_version to mdev sysfs " Yan Zhao
2020-04-13 5:55 ` [PATCH v5 3/4] vfio/mdev: add migration_version attribute for mdev (under mdev device node) Yan Zhao
2020-04-15 7:42 ` Erik Skultety
2020-04-15 9:02 ` Yan Zhao
2020-04-13 5:55 ` [PATCH v5 4/4] drm/i915/gvt: export migration_version to mdev sysfs " Yan Zhao
2020-04-17 8:44 ` [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration Cornelia Huck
2020-04-17 9:52 ` Yan Zhao
2020-04-17 11:24 ` Cornelia Huck
2020-04-20 1:24 ` Yan Zhao
2020-04-20 22:56 ` Alex Williamson
2020-04-21 2:37 ` Yan Zhao
2020-04-21 12:08 ` Tian, Kevin
2020-04-22 7:36 ` Yan Zhao
2020-04-24 19:10 ` Dr. David Alan Gilbert
2020-04-26 1:36 ` Yan Zhao
2020-04-27 15:37 ` Dr. David Alan Gilbert
2020-04-28 0:54 ` Yan Zhao
2020-04-28 14:14 ` Dr. David Alan Gilbert
2020-04-29 7:26 ` Yan Zhao
2020-04-29 8:22 ` Dr. David Alan Gilbert
2020-04-29 9:35 ` Yan Zhao
2020-04-29 9:48 ` Dr. David Alan Gilbert
2020-04-30 0:39 ` Yan Zhao
2020-06-02 22:55 ` Alex Williamson
2020-06-03 3:19 ` Yan Zhao
2020-06-03 3:55 ` Alex Williamson
2020-06-03 5:24 ` Yan Zhao
2020-06-03 16:26 ` Alex Williamson
2020-06-05 10:22 ` Dr. David Alan Gilbert
2020-06-05 14:31 ` Alex Williamson
2020-06-05 14:39 ` Dr. David Alan Gilbert
2020-06-10 0:37 ` Yan Zhao [this message]
2020-06-19 22:40 ` Alex Williamson
2020-06-22 2:28 ` Yan Zhao
2020-04-29 14:13 ` Eric Blake
2020-04-30 0:45 ` Yan Zhao
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=20200610003731.GA13961@joy-OptiPlex-7040 \
--to=yan.y.zhao@intel.com \
--cc=Ken.Xue@amd.com \
--cc=Zhengxiao.zx@alibaba-inc.com \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=berrange@redhat.com \
--cc=changpeng.liu@intel.com \
--cc=cjia@nvidia.com \
--cc=cohuck@redhat.com \
--cc=corbet@lwn.net \
--cc=dgilbert@redhat.com \
--cc=dinechin@redhat.com \
--cc=eauger@redhat.com \
--cc=eskultet@redhat.com \
--cc=felipe@nutanix.com \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=jonathan.davies@nutanix.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=libvir-list@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=shaopeng.he@intel.com \
--cc=shuangtai.tst@alibaba-inc.com \
--cc=xin.zeng@intel.com \
--cc=yi.l.liu@intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.a.wang@intel.com \
--cc=ziye.yang@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).