public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Michał Winiarski" <michal.winiarski@intel.com>
To: Alex Williamson <alex@shazbot.org>
Cc: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
	intel-xe@lists.freedesktop.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2 2/2] vfio/xe: Notify PF about VF FLR in reset_prepare
Date: Mon, 23 Mar 2026 17:38:17 +0100	[thread overview]
Message-ID: <acFrehlp4nfI0I7O@nostramo> (raw)
In-Reply-To: <20260317084340.619c5fad@shazbot.org>

On Tue, Mar 17, 2026 at 08:43:40AM -0600, Alex Williamson wrote:
> On Mon, 9 Mar 2026 16:24:49 +0100
> "Piórkowski, Piotr" <piotr.piorkowski@intel.com> wrote:
> 
> > From: Piotr Piórkowski <piotr.piorkowski@intel.com>
> > 
> > Hook into the PCI error handler reset_prepare() callback to notify
> > the PF about an upcoming VF FLR before reset_done() is executed.
> > This enables early FLR_PREPARE signaling and ensures that the PF is
> > aware of the reset before the completion wait begins.
> > 
> > Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > ---
> >  drivers/vfio/pci/xe/main.c | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> > 
> > diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
> > index fff95b2d5dde..88acfcf840fc 100644
> > --- a/drivers/vfio/pci/xe/main.c
> > +++ b/drivers/vfio/pci/xe/main.c
> > @@ -85,6 +85,19 @@ static void xe_vfio_pci_state_mutex_unlock(struct xe_vfio_pci_core_device *xe_vd
> >  	spin_unlock(&xe_vdev->reset_lock);
> >  }
> >  
> > +static void xe_vfio_pci_reset_prepare(struct pci_dev *pdev)
> > +{
> > +	struct xe_vfio_pci_core_device *xe_vdev = pci_get_drvdata(pdev);
> > +	int ret;
> > +
> > +	if (!pdev->is_virtfn)
> > +		return;
> > +
> > +	ret = xe_sriov_vfio_flr_prepare(xe_vdev->xe, xe_vdev->vfid);
> > +	if (ret)
> > +		dev_err(&pdev->dev, "Failed to prepare FLR: %d\n", ret);
> > +}
> > +
> >  static void xe_vfio_pci_reset_done(struct pci_dev *pdev)
> >  {
> >  	struct xe_vfio_pci_core_device *xe_vdev = pci_get_drvdata(pdev);
> > @@ -127,6 +140,7 @@ static void xe_vfio_pci_reset_done(struct pci_dev *pdev)
> >  }
> >  
> >  static const struct pci_error_handlers xe_vfio_pci_err_handlers = {
> > +	.reset_prepare = xe_vfio_pci_reset_prepare,
> >  	.reset_done = xe_vfio_pci_reset_done,
> >  	.error_detected = vfio_pci_core_aer_err_detected,
> >  };
> 
> Looks ok to me, should really have Michał's ack as well.  Will this go
> in through drm?
> 
> Reviewed-by: Alex Williamson <alex@shazbot.org>

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

And yes, we can take it through DRM.

Thanks,
-Michał

  reply	other threads:[~2026-03-23 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 15:24 [PATCH v2 0/2] Improve VF FLR synchronization for Xe VFIO Piórkowski, Piotr
2026-03-09 15:24 ` [PATCH v2 1/2] drm/xe/pf: Add FLR_PREPARE state to VF control flow Piórkowski, Piotr
2026-03-23 16:40   ` Michał Winiarski
2026-03-09 15:24 ` [PATCH v2 2/2] vfio/xe: Notify PF about VF FLR in reset_prepare Piórkowski, Piotr
2026-03-17 14:43   ` Alex Williamson
2026-03-23 16:38     ` Michał Winiarski [this message]
2026-03-09 15:34 ` ✓ CI.KUnit: success for Improve VF FLR synchronization for Xe VFIO (rev2) Patchwork
2026-03-09 16:37 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-09 20:16 ` ✗ Xe.CI.FULL: failure " Patchwork

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=acFrehlp4nfI0I7O@nostramo \
    --to=michal.winiarski@intel.com \
    --cc=alex@shazbot.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kvm@vger.kernel.org \
    --cc=piotr.piorkowski@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