All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	Yishai Hadas <yishaih@nvidia.com>
Cc: "maorg@nvidia.com" <maorg@nvidia.com>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"shameerali.kolothum.thodi@huawei.com" 
	<shameerali.kolothum.thodi@huawei.com>,
	"liulongfang@huawei.com" <liulongfang@huawei.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"jgg@nvidia.com" <jgg@nvidia.com>
Subject: RE: [PATCH vfio 2/2] vfio: Split migration ops from main device ops
Date: Fri, 17 Jun 2022 04:04:37 +0000	[thread overview]
Message-ID: <BN9PR11MB5276D9D472EDC5988C0C9C4B8CAF9@BN9PR11MB5276.namprd11.prod.outlook.com> (raw)
In-Reply-To: 20220616170118.497620ba.alex.williamson@redhat.com

> From: Tian, Kevin
> Sent: Friday, June 17, 2022 11:59 AM
> 
> > From: Alex Williamson <alex.williamson@redhat.com>
> > Sent: Friday, June 17, 2022 7:01 AM
> >
> > The whole mig_ops handling seems rather ad-hoc to me.  What tells a
> > developer when mig_ops can be set?  Can they be unset?  Does this
> > enable a device feature callout to dynamically enable migration?  Why do
> > we init the device with vfio_device_ops, but then open code per driver
> > setting vfio_migration_ops?
> >
> 
> A simpler fix could be treating device->migration_flags==0 as indicator
> of no support of migration. w/o additional flags only RUNNING and
> ERROR states are supported which cannot support migration. Failing
> the related device feature ops in such case sounds clearer to me.

Actually this check is anyway required given the uAPI requires STOP_COPY
**must** be supported:

/*
 * Indicates the device can support the migration API through
 * VFIO_DEVICE_FEATURE_MIG_DEVICE_STATE. If this GET succeeds, the RUNNING and
 * ERROR states are always supported. Support for additional states is
 * indicated via the flags field; at least VFIO_MIGRATION_STOP_COPY must be
 * set.

  parent reply	other threads:[~2022-06-17  4:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06  8:56 [PATCH vfio 0/2] Migration few enhancements Yishai Hadas
2022-06-06  8:56 ` [PATCH vfio 1/2] vfio/mlx5: Protect mlx5vf_disable_fds() upon close device Yishai Hadas
2022-06-10  3:25   ` Tian, Kevin
2022-06-06  8:56 ` [PATCH vfio 2/2] vfio: Split migration ops from main device ops Yishai Hadas
2022-06-10  3:32   ` Tian, Kevin
2022-06-13  7:13     ` Yishai Hadas
2022-06-16 14:18       ` Yishai Hadas
2022-06-16 23:01         ` Alex Williamson
2022-06-17  3:58           ` Tian, Kevin
2022-06-17  4:04           ` Tian, Kevin [this message]
2022-06-17  8:50           ` Shameerali Kolothum Thodi
2022-06-17 14:47             ` Alex Williamson
2022-06-19  9:25               ` Yishai Hadas
2022-06-20  3:49                 ` Jason Gunthorpe
2022-06-21 16:41                   ` Alex Williamson
2022-06-24 14:12                     ` Jason Gunthorpe
2022-06-24 14:41                       ` Alex Williamson
2022-06-24 14:53                         ` Jason Gunthorpe

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=BN9PR11MB5276D9D472EDC5988C0C9C4B8CAF9@BN9PR11MB5276.namprd11.prod.outlook.com \
    --to=kevin.tian@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=kvm@vger.kernel.org \
    --cc=liulongfang@huawei.com \
    --cc=maorg@nvidia.com \
    --cc=shameerali.kolothum.thodi@huawei.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 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.