All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Error recovery for zPCI passthrough devices
@ 2026-08-31 18:31 Farhan Ali
  2026-08-31 18:31 ` [PATCH v4 1/4] linux-headers: Update Linux header to 7.3-rc1 Farhan Ali
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Farhan Ali @ 2026-08-31 18:31 UTC (permalink / raw)
  To: qemu-devel, qemu-s390x; +Cc: mjrosato, alifm, farman, cohuck, alex, clg, armbru

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.

Thanks 
Farhan

[1] https://lore.kernel.org/all/20260818164326.387bb27b@shazbot.org/

ChangeLog
---------
v3 https://lore.kernel.org/qemu-devel/20250925174852.1302-1-alifm@linux.ibm.com/
v3 -> v4
    - Include linux headers for 7.3-rc1.
    - Rework VFIO API changes based on the kernel API (patch 3).
    - Address Markus's comments from v3 (patch 2).

v2 https://lore.kernel.org/qemu-devel/20250825212434.2255-1-alifm@linux.ibm.com/
v2 -> v3
    - Update arch_err_handler to err_handler and include Error ** in
    function definition. (patch 2)

    - Introduce helper function to hide the internal indirection of device_feature()
    (patch 3)

    - Update function definitions to include Error ** (patch 4)
    


v1 https://lore.kernel.org/qemu-devel/20250813174152.1238-1-alifm@linux.ibm.com/
v1 -> v2
   - Use VFIO_DEVICE_FEATURE ioctl to get device error information.
   (Based on Alex's feedback on kernel series)

Farhan Ali (4):
  linux-headers: Update Linux header to 7.3-rc1
  vfio/pci: Add an error handler callback
  s390x/pci: Add PCI error handling for vfio pci devices
  s390x/pci: Reset a device in error state

 hw/s390x/s390-pci-bus.c                     |  16 ++
 hw/s390x/s390-pci-vfio-stubs.c              |  10 +
 hw/s390x/s390-pci-vfio.c                    | 110 +++++++++++
 hw/vfio/pci.c                               |  27 ++-
 hw/vfio/pci.h                               |   1 +
 include/hw/s390x/s390-pci-bus.h             |   2 +
 include/hw/s390x/s390-pci-vfio.h            |   2 +
 include/standard-headers/drm/drm_fourcc.h   | 209 ++++++++++++++++++--
 include/standard-headers/linux/ethtool.h    |   6 +
 include/standard-headers/linux/fuse.h       |  63 +++++-
 include/standard-headers/linux/virtio_ids.h |   1 +
 linux-headers/asm-arm64/kvm.h               |   1 +
 linux-headers/asm-riscv/kvm.h               |  13 ++
 linux-headers/linux/iommufd.h               |  45 ++++-
 linux-headers/linux/kvm.h                   |   1 +
 linux-headers/linux/userfaultfd.h           |  54 ++++-
 linux-headers/linux/vduse.h                 |  28 +++
 linux-headers/linux/vfio.h                  |  21 ++
 linux-headers/linux/vfio_zdev.h             |   2 +
 19 files changed, 579 insertions(+), 33 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-09-08 19:26 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 18:31 [PATCH v4 0/4] Error recovery for zPCI passthrough devices Farhan Ali
2026-08-31 18:31 ` [PATCH v4 1/4] linux-headers: Update Linux header to 7.3-rc1 Farhan Ali
2026-08-31 18:31 ` [PATCH v4 2/4] vfio/pci: Add an error handler callback Farhan Ali
2026-09-02  8:07   ` Cédric Le Goater
2026-09-02  8:21     ` Shameer Kolothum Thodi
2026-09-02 10:39     ` Markus Armbruster
2026-09-02 16:23       ` Farhan Ali
2026-09-03 10:24         ` Markus Armbruster
2026-09-02 16:34     ` Farhan Ali
2026-09-03 12:08       ` Shameer Kolothum Thodi
2026-09-03 18:07         ` Farhan Ali
2026-09-04  9:58           ` Shameer Kolothum Thodi
2026-08-31 18:31 ` [PATCH v4 3/4] s390x/pci: Add PCI error handling for vfio pci devices Farhan Ali
2026-09-02  8:22   ` Cédric Le Goater
2026-09-02 16:43     ` Farhan Ali
2026-08-31 18:31 ` [PATCH v4 4/4] s390x/pci: Reset a device in error state Farhan Ali
2026-09-02  8:27   ` Cédric Le Goater
2026-09-02 16:48     ` Farhan Ali
2026-09-03  9:19 ` [PATCH v4 0/4] Error recovery for zPCI passthrough devices Cédric Le Goater
2026-09-03 17:55   ` Farhan Ali
2026-09-08 19:25     ` Farhan Ali

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.