netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Brett Creeley <bcreeley@amd.com>
Cc: Brett Creeley <brett.creeley@amd.com>,
	kvm@vger.kernel.org, netdev@vger.kernel.org,
	alex.williamson@redhat.com, yishaih@nvidia.com,
	shameerali.kolothum.thodi@huawei.com, kevin.tian@intel.com,
	simon.horman@corigine.com, shannon.nelson@amd.com
Subject: Re: [PATCH v13 vfio 6/7] vfio/pds: Add support for firmware recovery
Date: Fri, 4 Aug 2023 15:03:31 -0300	[thread overview]
Message-ID: <ZM09c8IG+ba+fdts@nvidia.com> (raw)
In-Reply-To: <73aa389d-7ef6-5563-0109-a4d6750756df@amd.com>

On Fri, Aug 04, 2023 at 10:34:18AM -0700, Brett Creeley wrote:
> 
> 
> On 8/4/2023 10:18 AM, Jason Gunthorpe wrote:
> > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> > 
> > 
> > On Tue, Jul 25, 2023 at 02:40:24PM -0700, Brett Creeley wrote:
> > > It's possible that the device firmware crashes and is able to recover
> > > due to some configuration and/or other issue. If a live migration
> > > is in progress while the firmware crashes, the live migration will
> > > fail. However, the VF PCI device should still be functional post
> > > crash recovery and subsequent migrations should go through as
> > > expected.
> > > 
> > > When the pds_core device notices that firmware crashes it sends an
> > > event to all its client drivers. When the pds_vfio driver receives
> > > this event while migration is in progress it will request a deferred
> > > reset on the next migration state transition. This state transition
> > > will report failure as well as any subsequent state transition
> > > requests from the VMM/VFIO. Based on uapi/vfio.h the only way out of
> > > VFIO_DEVICE_STATE_ERROR is by issuing VFIO_DEVICE_RESET. Once this
> > > reset is done, the migration state will be reset to
> > > VFIO_DEVICE_STATE_RUNNING and migration can be performed.
> > 
> > Have you actually tested this? Does the qemu side respond properly if
> > this happens during a migration?
> > 
> > Jason
> 
> Yes, this has actually been tested. It's not necessary clean as far as the
> log messages go because the driver may still be getting requests (i.e. dirty
> log requests), but the noise should be okay because this is a very rare
> event.
> 
> QEMU does respond properly and in the manner I mentioned above.

But what actually happens?

QEMU aborts the migration and FLRs the device and then the VM has a
totally trashed PCI function?

Can the VM recover from this?

Jason

  reply	other threads:[~2023-08-04 18:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 21:40 [PATCH v13 vfio 0/7] pds-vfio-pci driver Brett Creeley
2023-07-25 21:40 ` [PATCH v13 vfio 1/7] vfio: Commonize combine_ranges for use in other VFIO drivers Brett Creeley
2023-08-04 16:51   ` Jason Gunthorpe
2023-07-25 21:40 ` [PATCH v13 vfio 2/7] vfio/pds: Initial support for pds VFIO driver Brett Creeley
2023-07-25 21:40 ` [PATCH v13 vfio 3/7] vfio/pds: register with the pds_core PF Brett Creeley
2023-07-31 20:57   ` Alex Williamson
2023-08-01 15:44     ` Brett Creeley
2023-08-04 17:03   ` Jason Gunthorpe
2023-08-04 17:23     ` Brett Creeley
2023-08-04 19:21       ` Brett Creeley
2023-08-04 22:42         ` Jason Gunthorpe
2023-08-07 17:28           ` Brett Creeley
2023-07-25 21:40 ` [PATCH v13 vfio 4/7] vfio/pds: Add VFIO live migration support Brett Creeley
2023-07-25 21:40 ` [PATCH v13 vfio 5/7] vfio/pds: Add support for dirty page tracking Brett Creeley
2023-08-03 12:43   ` Shameerali Kolothum Thodi
2023-08-03 19:53     ` Brett Creeley
2023-07-25 21:40 ` [PATCH v13 vfio 6/7] vfio/pds: Add support for firmware recovery Brett Creeley
2023-08-04 17:18   ` Jason Gunthorpe
2023-08-04 17:34     ` Brett Creeley
2023-08-04 18:03       ` Jason Gunthorpe [this message]
2023-08-04 18:50         ` Brett Creeley
2023-08-10  3:46           ` Tian, Kevin
2023-07-25 21:40 ` [PATCH v13 vfio 7/7] vfio/pds: Add Kconfig and documentation Brett Creeley
2023-07-26 13:35 ` [PATCH v13 vfio 0/7] pds-vfio-pci driver Jason Gunthorpe
2023-07-26 18:50   ` Alex Williamson
2023-07-26 19:05     ` Brett Creeley
2023-07-26 19:25       ` Alex Williamson
2023-08-03  8:28 ` Simon Horman

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=ZM09c8IG+ba+fdts@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=alex.williamson@redhat.com \
    --cc=bcreeley@amd.com \
    --cc=brett.creeley@amd.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shannon.nelson@amd.com \
    --cc=simon.horman@corigine.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 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).