All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yan Zhao <yan.y.zhao@intel.com>
To: Alex Williamson <alex.williamson@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>,
	"Felipe Franciosi" <felipe@nutanix.com>,
	"Zeng, Xin" <xin.zeng@intel.com>,
	qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Kirti Wankhede" <kwankhede@nvidia.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Thanos Makatos" <thanos.makatos@nutanix.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: VFIO Migration
Date: Fri, 6 Nov 2020 07:37:03 +0800	[thread overview]
Message-ID: <20201105233702.GA1584@yzhao56-desk> (raw)
In-Reply-To: <20201103101305.10254ae4@w520.home>

On Tue, Nov 03, 2020 at 10:13:05AM -0700, Alex Williamson wrote:
> On Tue, 3 Nov 2020 11:03:24 +0000
> Stefan Hajnoczi <stefanha@redhat.com> wrote:

<...>
>  
> > Management tools need to match the device model/configuration from the
> > source device against the destination device. If the destination is
> > capable of supporting the source's device model/configuration then
> > migration can proceed safely.
> > 
> > Let's look at the case where we are migration from an older version of a
> > device to a newer version. On the source we have:
> > 
> >   model = https://vendor-a.com/my-nic
> > 
> > On the destination we have:
> > 
> >   model = https://vendor-a.com/my-nic
> >   rss = on
> > 
> > The two devices are incompatible because the destination exposes the RSS
> > feature that is not present on the source. The RSS feature involves
> > guest-visible hardware interface changes and a change to the device
> > state representation. It is not safe to migrate!
> > 
> > In this case an extra configuration step is necessary so that the
> > destination device can accept the device state from the source. The
> > management tool invokes a vendor-specific tool to put the device into
> > the right configuration:
> > 
> >   # vendor-tool set-migration-config --device 0000:00:04.0 \
> >                                      --model https://vendor-a.com/my-nic
> > 
> > (This tool only succeeds when the device is bound to VFIO but not yet
> > opened.)
> > 
> > The tool invokes ioctls on the vendor-specific VFIO driver that does two
> > things:
> > 1. Tells the device to present the old hardware interface without RSS
> > 2. Uses the old device state representation without RSS support
> > 
> > Does this approach fit?
> 
> 
> Should we not require that any sort of configuration like this occurs
> through sysfs?  We must be able to create an instance with a specific
> configuration without using vendor specific tools, therefore in the
> worse case we should be able to remove and recreate an instance as we
> desire without invoking vendor specific tools.  Thanks,
> 
hi Alex,
could mdevctl serve as a general configuration tool to create/destroy/config
mdev devices?

I think previously the main debate is on what is an easy way for management
tool to find and create a compatible target mdev device according to sysfs
info of source mdev device, is it?
as in [1], we have simplified the method to 1:1 matching of mdev_type
in src and target. and we can further force it to be 1:1 matching of
vendor_specific attributes (e.g. pci id) and dynamic resources
(e.g. aggregator, fps,...) and have mdevctl to create a compatible target
for management tools.

Given management tools like openstack are still in their preliminary
stage of supporting mdev devices, could we first settle down the
compatibility sysfs protocol and treat mdevctl as userspace tool
currently?

[1]: https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg03273.html

Thanks
Yan


  parent reply	other threads:[~2020-11-05 23:39 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 11:11 VFIO Migration Stefan Hajnoczi
2020-11-02 12:28 ` Cornelia Huck
2020-11-02 14:56   ` Stefan Hajnoczi
2020-11-04  8:07     ` Gerd Hoffmann
2020-11-04 16:40       ` Stefan Hajnoczi
2020-11-05  6:47         ` Gerd Hoffmann
2020-11-05 11:42           ` Stefan Hajnoczi
2020-11-02 19:38 ` Alex Williamson
2020-11-03 11:03   ` Stefan Hajnoczi
2020-11-03 17:13     ` Alex Williamson
2020-11-03 18:09       ` Stefan Hajnoczi
2020-11-05 23:37       ` Yan Zhao [this message]
2020-11-03  8:46 ` Jason Wang
2020-11-03 12:15   ` Stefan Hajnoczi
2020-11-04  3:32     ` Jason Wang
2020-11-04  7:16       ` Stefan Hajnoczi
2020-11-03 11:39 ` Daniel P. Berrangé
2020-11-03 15:05   ` Stefan Hajnoczi
2020-11-03 15:23     ` Daniel P. Berrangé
2020-11-03 18:16       ` Stefan Hajnoczi
2020-11-03 12:17 ` Dr. David Alan Gilbert
2020-11-03 15:27   ` Stefan Hajnoczi
2020-11-03 18:49     ` Dr. David Alan Gilbert
2020-11-04  7:36       ` Stefan Hajnoczi
2020-11-04 10:14         ` Dr. David Alan Gilbert
2020-11-04 16:47           ` Stefan Hajnoczi
2020-11-04 17:32             ` Dr. David Alan Gilbert
2020-11-05 11:40               ` Stefan Hajnoczi
2020-11-05 12:13                 ` Dr. David Alan Gilbert
2020-11-05 12:47                   ` Michael S. Tsirkin
2020-11-05 14:17                     ` Dr. David Alan Gilbert
2020-11-05 12:53                 ` Michael S. Tsirkin
2020-11-04 11:05       ` Christophe de Dinechin
2020-11-03 15:23 ` Christophe de Dinechin
2020-11-03 15:33   ` Daniel P. Berrangé
2020-11-03 17:31     ` Alex Williamson
2020-11-04 10:13       ` Stefan Hajnoczi
2020-11-04 11:10   ` Stefan Hajnoczi
2020-11-04  7:50 ` Michael S. Tsirkin
2020-11-04 16:37   ` Stefan Hajnoczi

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=20201105233702.GA1584@yzhao56-desk \
    --to=yan.y.zhao@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=felipe@nutanix.com \
    --cc=jasowang@redhat.com \
    --cc=john.g.johnson@oracle.com \
    --cc=kevin.tian@intel.com \
    --cc=kwankhede@nvidia.com \
    --cc=mtsirkin@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=thanos.makatos@nutanix.com \
    --cc=xin.zeng@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.