kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yan Zhao <yan.y.zhao@intel.com>
To: kvm@vger.kernel.org, libvir-list@redhat.com,
	qemu-devel@nongnu.org, openstack-discuss@lists.openstack.org,
	intel-gvt-dev@lists.freedesktop.org
Cc: smooney@redhat.com, "Cornelia Huck" <cohuck@redhat.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Daniel P.Berrangé" <berrange@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	kwankhede@nvidia.com, eauger@redhat.com, xin-ran.wang@intel.com,
	corbet@lwn.net, shaohe.feng@intel.com, kevin.tian@intel.com,
	"Parav Pandit" <parav@mellanox.com>,
	jian-feng.ding@intel.com, dgilbert@redhat.com,
	zhenyuw@linux.intel.com, hejie.xu@intel.com,
	bao.yumeng@zte.com.cn, intel-gvt-dev@lists.freedesktop.org,
	eskultet@redhat.com, "Jiri Pirko" <jiri@mellanox.com>,
	dinechin@redhat.com
Subject: Re: device compatibility interface for live migration with assigned devices
Date: Wed, 9 Sep 2020 13:37:56 +0800	[thread overview]
Message-ID: <20200909053755.GA721@joy-OptiPlex-7040> (raw)
In-Reply-To: <20200831044344.GB13784@joy-OptiPlex-7040>

hi All,
Per our previous discussion, there are two main concerns to the previous
proposal:
(1) it's currently hard for openstack to match mdev types.
(2) complicated.

so, we further propose below changes:
(1) requiring two compatible mdevs to have the same mdev type for now.
    (though kernel still exposes compatible_type attributes for future use)  
(2) requiring 1:1 match for other attributes under sysfs type node for now
    (those attributes are specified via compatible_<attribute name> but
    with only 1 value in it.)
(3) do not match attributes under device instance node.
    rather, they are regarded as part of resource claiming process.
    so src and dest values are ensured to be 1:1.
    A dynamic_resources attribute under sysfs <type-id> node is added to
    list the attributes under device instance that mgt tools need to
    ensure 1:1 from src and dest.
    the "aggregator" attribute under device instance node is such one that
    needs to be listed.
    Those listed attributes can actually be treated as device state set by
    vendor driver during live migration. but we still want to ask for them to
    be set by mgt tools before live migration starts, in oder to reduce the
    chance of live migration failure.

do you like those changes?

after the changes, the sysfs interface would look like blow:

  |- [parent physical device]
  |--- Vendor-specific-attributes [optional]
  |--- [mdev_supported_types]
  |     |--- [<type-id>]
  |     |   |--- create
  |     |   |--- name
  |     |   |--- available_instances
  |     |   |--- device_api
  |     |   |--- software_version
  |     |   |--- compatible_type
  |     |   |--- compatible_<device_api_specific_field>
  |     |   |--- compatible_<type_specific_field>
  |     |   |--- dynamic_resources
  |     |   |--- description
  |     |   |--- [devices]

- device_api : exact match between src and dest is required.
               its value can be one of 
               "vfio-pci", "vfio-platform", "vfio-amba", "vfio-ccw", "vfio-ap"
- software_version: version of vendor driver.
                    in major.minor.bugfix scheme. 
                    dest major should be equal to src major,
	            dest minor should be no less than src minor.
		    once migration stream related code changed, vendor
		    drivers need to bump the version.
- compatible_type: not used by mgt tools currently.
                   vendor drivers can provide this attribute, but need to
		   know that mgt apps would ignore it.
		   when in future mgt tools support this attribute, it
		   would allow migration across different mdev types,
		   so that devices of older generation may be able to
		   migrate to newer generations.

- compatible_<device_api_specific_field>: for device api specific attributes,
                  e.g. compatible_subchannel_type,
                  dest values should be superset of arc values.
		  vendor drivers can specify only one value in this attribute,
		  in order to do exact match between src and dest.
		  It's ok for mgt tools to only read one value in the
		  attribute so that src:dest values are 1:1.

- compatible_<type_specific_field>: for mdev type specific attributes,
                  e.g. compatible_pci_ids, compatible_chpid_type
                  dest values should be superset of arc values.
		  vendor drivers can specify only one value in the attribute
		  in order to do exact match between src and dest.
		  It's ok for mgt tools to only read one value in the
		  attribute so that src:dest values are 1:1.

- dynamic_resources: though defined statically under <type-id>,
                  this attribute lists attributes under device instance that
		  need to be set as part of claiming dest resources.
		  e.g. $cat dynamic_resources: aggregator, fps,...
		  then after dest device is created, values of its device
		  attributes need to be set to that of src device attributes.
		  Failure in syncing src device values to dest device
		  values is treated the same as failing to claiming
		  dest resources.
		  attributes under device instance that are not listed
		  in this attribute would not be part of resource checking in
		  mgt tools.



Thanks
Yan

  parent reply	other threads:[~2020-09-09  5:43 UTC|newest]

Thread overview: 114+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 23:29 device compatibility interface for live migration with assigned devices Yan Zhao
2020-07-14 10:21 ` Daniel P. Berrangé
2020-07-14 12:33   ` Sean Mooney
     [not found]     ` <20200714110148.0471c03c@x1.home>
     [not found]       ` <eb705c72cdc8b6b8959b6ebaeeac6069a718d524.camel@redhat.com>
2020-07-14 21:15         ` Sean Mooney
2020-07-14 16:16   ` Alex Williamson
2020-07-14 16:47     ` Daniel P. Berrangé
2020-07-14 20:47       ` Alex Williamson
2020-07-15  9:16         ` Daniel P. Berrangé
2020-07-14 17:19     ` Dr. David Alan Gilbert
2020-07-14 20:59       ` Alex Williamson
2020-07-15  8:20         ` Yan Zhao
2020-07-15  8:49           ` Feng, Shaohe
2020-07-17 14:59           ` Alex Williamson
2020-07-17 18:03             ` Dr. David Alan Gilbert
2020-07-17 18:30               ` Alex Williamson
2020-07-15  8:23         ` Dr. David Alan Gilbert
     [not found]         ` <CAH7mGatPWsczh_rbVhx4a+psJXvkZgKou3r5HrEQTqE7SqZkKA@mail.gmail.com>
2020-07-17 15:18           ` Alex Williamson
2020-07-16  4:16 ` Jason Wang
2020-07-16  8:32   ` Yan Zhao
2020-07-16  9:30     ` Jason Wang
2020-07-17 16:12     ` Alex Williamson
2020-07-20  3:41       ` Jason Wang
2020-07-20 10:39         ` Sean Mooney
2020-07-21  2:11           ` Jason Wang
2020-07-21  0:51       ` Yan Zhao
2020-07-27  7:24         ` Yan Zhao
2020-07-27 22:23           ` Alex Williamson
2020-07-29  8:05             ` Yan Zhao
2020-07-29 11:28               ` Sean Mooney
2020-07-29 19:12                 ` Alex Williamson
2020-07-30  3:41                   ` Yan Zhao
2020-07-30 13:24                     ` Sean Mooney
2020-07-30 17:29                     ` Alex Williamson
2020-08-04  8:37                       ` Yan Zhao
2020-08-05  9:44                         ` Dr. David Alan Gilbert
2020-07-30  1:56                 ` Yan Zhao
2020-07-30 13:14                   ` Sean Mooney
2020-08-04 16:35               ` Cornelia Huck
2020-08-05  2:22                 ` Jason Wang
2020-08-05  2:16                   ` Yan Zhao
2020-08-05  2:41                     ` Jason Wang
2020-08-05  7:56                       ` Jiri Pirko
2020-08-05  8:02                         ` Jason Wang
2020-08-05  9:33                           ` Yan Zhao
2020-08-05 10:53                             ` Jiri Pirko
2020-08-05 11:35                               ` Sean Mooney
2020-08-07 11:59                                 ` Cornelia Huck
2020-08-13 15:33                                   ` Cornelia Huck
2020-08-13 19:02                                     ` Eric Farman
2020-08-17  6:38                                       ` Cornelia Huck
2020-08-10  7:46                               ` Yan Zhao
2020-08-13  4:24                                 ` Jason Wang
2020-08-14  5:16                                   ` Yan Zhao
2020-08-14 12:30                                     ` Sean Mooney
2020-08-17  1:52                                       ` Yan Zhao
2020-08-18  3:24                                     ` Jason Wang
2020-08-18  8:55                                       ` Daniel P. Berrangé
2020-08-18  9:06                                         ` Cornelia Huck
2020-08-18  9:24                                           ` Daniel P. Berrangé
2020-08-18  9:38                                             ` Cornelia Huck
     [not found]                                         ` <3a073222-dcfe-c02d-198b-29f6a507b2e1@redhat.com>
2020-08-18  9:16                                           ` Daniel P. Berrangé
2020-08-18  9:36                                             ` Cornelia Huck
2020-08-18  9:39                                               ` Parav Pandit
2020-08-19  3:30                                                 ` Yan Zhao
2020-08-19  5:58                                                   ` Parav Pandit
2020-08-19  9:41                                                     ` Jason Wang
2020-08-19  6:57                                                   ` [ovirt-devel] " Jason Wang
2020-08-19  6:59                                                     ` Yan Zhao
2020-08-19  7:39                                                       ` Jason Wang
2020-08-19  8:13                                                         ` Yan Zhao
2020-08-19  9:28                                                           ` Jason Wang
2020-08-20 12:27                                                             ` Cornelia Huck
2020-08-21  3:14                                                               ` Jason Wang
2020-08-21 14:52                                                                 ` Cornelia Huck
2020-08-31  3:07                                                                   ` Jason Wang
2020-08-19 17:50                                                   ` Alex Williamson
2020-08-20  0:18                                                     ` Yan Zhao
2020-08-20  3:13                                                       ` Alex Williamson
2020-08-20  3:09                                                         ` Yan Zhao
2020-08-19  2:54                                               ` Jason Wang
2020-08-20  0:39                                               ` Yan Zhao
2020-08-20  1:29                                                 ` Sean Mooney
2020-08-20  4:01                                                   ` Yan Zhao
2020-08-20  5:16                                                     ` Sean Mooney
2020-08-20  6:27                                                       ` Yan Zhao
2020-08-20 13:24                                                         ` Sean Mooney
2020-08-26  8:54                                                           ` Yan Zhao
2020-08-20  3:22                                                 ` Alex Williamson
2020-08-20  3:16                                                   ` Yan Zhao
2020-08-25 14:39                                                     ` Cornelia Huck
2020-08-26  6:41                                                       ` Yan Zhao
2020-08-28 13:47                                                         ` Cornelia Huck
2020-08-28 14:04                                                           ` Sean Mooney
2020-08-31  4:43                                                             ` Yan Zhao
2020-09-08 14:41                                                               ` Cornelia Huck
2020-09-09  2:13                                                                 ` Yan Zhao
2020-09-10 12:38                                                                   ` Cornelia Huck
2020-09-10 12:50                                                                     ` Sean Mooney
2020-09-10 18:02                                                                       ` Alex Williamson
2020-09-11  0:56                                                                         ` Yan Zhao
2020-09-11 10:08                                                                           ` Cornelia Huck
2020-09-11 10:18                                                                             ` Tian, Kevin
2020-09-11 16:51                                                                           ` Alex Williamson
2020-09-14 13:48                                                                             ` Zeng, Xin
2020-09-14 14:44                                                                               ` Alex Williamson
2020-09-09  5:37                                                               ` Yan Zhao [this message]
2020-08-31  2:23                                                           ` Yan Zhao
2020-08-19  2:38                                             ` Jason Wang
2020-08-18  9:32                                           ` Parav Pandit
2020-08-19  2:45                                             ` Jason Wang
2020-08-19  5:26                                               ` Parav Pandit
2020-08-19  6:48                                                 ` Jason Wang
2020-08-19  6:53                                                   ` Parav Pandit
2020-07-29 19:05             ` 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=20200909053755.GA721@joy-OptiPlex-7040 \
    --to=yan.y.zhao@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=bao.yumeng@zte.com.cn \
    --cc=berrange@redhat.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=hejie.xu@intel.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jasowang@redhat.com \
    --cc=jian-feng.ding@intel.com \
    --cc=jiri@mellanox.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=libvir-list@redhat.com \
    --cc=openstack-discuss@lists.openstack.org \
    --cc=parav@mellanox.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shaohe.feng@intel.com \
    --cc=smooney@redhat.com \
    --cc=xin-ran.wang@intel.com \
    --cc=zhenyuw@linux.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).