On 8/31/26 20:31, Farhan Ali wrote:
Hi,

This patch series introduces support for error recovery for passthrough PCI
devices on System Z (s390x). This is the user space component for the Linux
kernel patches [1]. The kernel patches were merged for 7.3 and it had some
significant changes in VFIO API since the last QEMU series was posted. But the
design for QEMU component is still the same.

For QEMU on eventfd notification for PCI error from vfio-pci driver we call the
vfio error handler. We can use a per device error handler callback to override
the default vfio error handler.  For s390x specific error handler, we retrieve
the architecture specific PCI error information and inject the information into
the guest. Once the guest receives the error information, the guest drivers will
drive the error recovery.  Typically recovery involves a device reset which
translate to CLP disable/enable cycle for the device.

I would appreciate some feedback on this patch series.

Hi Farhan,

Have you seen Shameer's kernel series for PCI error recovery [1] ?
It uses a dedicated eventfd registered via VFIO_DEVICE_FEATURE_SET,
with a self-contained handler independent of the legacy err_notifier.

The QEMU side [2] just probes the feature, installs the eventfd, and
suppresses the legacy vm_stop path with a bool flag : no callback in
generic VFIO PCI code, which is cleaner.

This is also the pattern used by the other s390 VFIO devices: vfio-ccw
has three dedicated eventfds (io_notifier, crw_notifier, req_notifier)
and vfio-ap has two (req_notifier, cfg_notifier).

For zPCI, it would mean extending VFIO_DEVICE_FEATURE_ZPCI_ERROR to
support SET with an eventfd field. The ABI is still new so the struct
can be extended, keeping the s390 error recovery code self-contained,
with no changes to generic VFIO  PCI code. I think this approach is
preferable.

Thanks,

C.

[1] https://lore.kernel.org/all/[email protected]/
[2] 
https://github.com/shamiali2008/qemu-master/commit/e45458710cd8509fa5bd81f4376126b77b6f40be



Reply via email to