Re: [RFC PATCH v2 00/16] vfio/pci: Handle PCI error recovery and report state to userspace
From: Keith Busch
Date: Fri Nov 06 2026 - 11:57:26 EST
On Tue, Sep 29, 2026 at 06:32:49PM +0100, Shameer Kolothum wrote:
> Hi,
>
> Currently, vfio-pci signals the error eventfd from error_detected() and
> returns PCI_ERS_RESULT_CAN_RECOVER, including for permanent failure. It
> has no slot_reset() or resume() callback, so userspace is not notified
> when host recovery completes or whether the device was reset.
>
> This series adds opt-in host PCI error recovery for vfio-pci. It blocks
> device access during recovery, restores device state after a host reset,
> and reports recovery status to userspace. The kernel runs host recovery
> and the VMM decides how to recover the guest.
We've been experiementating with this recently. It turns out that doing
a meaningful recovery on the user space side is a bit more difficult
than initially thought, but we can at least get more deterministic
behavior with these notifications and gracefully stop affected
processes. I don't think there is much else the kernel side can do to
make this go any better, so this series looks good to us.
Acked-by: Keith Busch <kbusch@xxxxxxxxxx>