Re: [PATCH v18 3/4] vfio/pci: Add a reset_done callback for vfio-pci driver
From: Alex Williamson
Date: Wed Jun 03 2026 - 18:50:49 EST
On Wed, 3 Jun 2026 11:24:14 -0700
Farhan Ali <alifm@xxxxxxxxxxxxx> wrote:
> On error recovery for a PCI device bound to vfio-pci driver, we want to
> recover the state of the device to its last known saved state. The callback
> restores the state of the device to its initial saved state.
>
> Reviewed-by: Julian Ruess <julianr@xxxxxxxxxxxxx>
> Reviewed-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
> Acked-by: Alex Williamson <alex@xxxxxxxxxxx>
> Reviewed-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>
> Signed-off-by: Farhan Ali <alifm@xxxxxxxxxxxxx>
> ---
> drivers/vfio/pci/vfio_pci_core.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
Sashiko has some interesting comments:
https://sashiko.dev/#/patchset/20260603182415.2324-4-alifm@xxxxxxxxxxxxx
I think the critical is a calculated risk we're taking, restoring the
hand-off state after reset. I don't think we'd considered the race,
and it seems the commit log could use some improvement, especially if
we do need to revisit this based on the calculated risk. Thanks,
Alex