From: Cornelia Huck <cohuck@redhat.com>
To: Stefan Hajnoczi <stefanha@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>,
"Thanos Makatos" <thanos.makatos@nutanix.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Christophe de Dinechin" <dinechin@redhat.com>,
"Yan Zhao" <yan.y.zhao@intel.com>
Subject: Re: [RFC v2] VFIO Migration
Date: Thu, 5 Nov 2020 16:52:20 +0100 [thread overview]
Message-ID: <20201105165220.7ad2d1a6.cohuck@redhat.com> (raw)
In-Reply-To: <20201105150902.GA472489@stefanha-x1.localdomain>
On Thu, 5 Nov 2020 15:09:02 +0000
Stefan Hajnoczi <stefanha@redhat.com> wrote:
(...)
<did not fully read through the v1 thread, so apologies if I missed
something>
> VFIO/mdev Devices
> -----------------
> TODO this is a first draft, more thought needed around enumerating supported
> parameters, representing default values, etc
>
> The following mdev type sysfs attrs are available for managing device
> instances:
>
> /sys/.../<parent-device>/mdev_supported_types/<type-id>/
> create - writing a UUID to this file instantiates a device
> migration/ - migration related files
> model - unique device model string, e.g. vendor-a.com/my-nic
>
> Device models supported by an mdev driver can be enumerated by reading the
> migration/model attr for each <type-id>.
IIUC, we're grouping together all users of a specific mdev_type, but
support a variety of sub-configurations? Does that include parameters
or not? If not, shouldn't we already be covered by mdev_type?
>
> The following mdev device sysfs attrs relate to a specific device instance:
>
> /sys/.../<parent-device>/<uuid>/
> mdev_type/ - symlink to mdev type sysfs attrs, e.g. to fetch migration/model
> migration/ - migration related files
> applied - Write "1" to apply current migration parameter values or
> "0" to reset migration parameter values to their defaults.
> Parameters can only be applied or reset while the mdev is
> not opened.
> params/ - migration parameters
> <my-param> - read/write migration parameter "my-param"
> ...
>
> When the device is created the migration/applied attr is "0". Migration
> parameters are accessible in migration/params/ and read 0 bytes because they
> are at their default values. At the point opening the mdev device will fail
> because migration parameters must be applied first. Migration parameters can be
> set to the desired values or left at their defaults. "1" must be written to
> migration/applied before opening the mdev device.
>
> If writing to a migration/params/<param> attr or setting migration/applied to
> "1" fails, then the device implementation does not support the migration
> parameters.
>
> An open mdev device typically does not allow migration parameters to be changed
> at runtime. However, certain migration/params attrs may allow writes at
> runtime. Usually these migration parameters only affect the device state
> representation and not the hardware interface. This makes it possible to
> upgrade or downgrade the device state representation at runtime so that
> migration is possible to newer or older device implementations.
>
> An existing mdev device instance can be reused by closing the mdev device and
> writing "0" to migration/applied. This resets parameters to their defaults so
> that a new list of migration parameters can be applied.
>
> The migration parameter list for an mdev device that is in operation can be
> read from migration/params/. Parameters that read 0 bytes are at their default
> value.
I'm trying to figure out what that means for the mdevs I'm most
familiar with, ccw and ap. Both of them currently support a single
mdev_type.
For ccw, there are some things that I could imagine as parameters, like
the device number, or channel paths. Maybe we could include the channel
path type (FICON, ...) in the migration device model? We should not
include device numbers etc. in the device model.
For ap, we have matrices covering tuples (APQNs) derived from a
cross-product of card/domains configure via sysfs attributes. I think
later modification of these is desired. I think we also might be able
to mix-and-match different types within the same matrix, so not sure if
we can put these into any device model. In fact, I'm a bit at a loss
how the device model for ap would look like (other than simply
'matrix'). Can we deal with dynamic parameters?
(...)
next prev parent reply other threads:[~2020-11-05 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 15:09 [RFC v2] VFIO Migration Stefan Hajnoczi
2020-11-05 15:52 ` Cornelia Huck [this message]
2020-11-10 9:37 ` Stefan Hajnoczi
2020-11-05 19:37 ` Alex Williamson
2020-11-10 9:52 ` 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=20201105165220.7ad2d1a6.cohuck@redhat.com \
--to=cohuck@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=stefanha@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).