From: Farhan Ali <alifm@linux.ibm.com>
To: "Cédric Le Goater" <clg@redhat.com>,
qemu-devel@nongnu.org, qemu-s390x@nongnu.org
Cc: mjrosato@linux.ibm.com, farman@linux.ibm.com, cohuck@redhat.com,
alex@shazbot.org, armbru@redhat.com,
Shameer Kolothum <skolothumtho@nvidia.com>
Subject: Re: [PATCH v4 0/4] Error recovery for zPCI passthrough devices
Date: Thu, 3 Sep 2026 10:55:34 -0700 [thread overview]
Message-ID: <e6dfaf88-e1af-4744-baa2-ef1d760e0bd0@linux.ibm.com> (raw)
In-Reply-To: <a5dea766-1131-49cb-bd26-6a09673b176e@redhat.com>
On 9/3/2026 2:19 AM, Cédric Le Goater wrote:
> 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 Cedric,
> 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).
My thought process was to use the existing legacy err_notifier and let
each vfio-pci device handle the error. I thought the callback would also
provide some flexibility on each device handling the error.
I can take a look at Shameer's approach and see if its something we can
do. Just briefly looking at the QEMU code, it looks like it it ties the
eventfd to the generic vfio-pci code (of course this is in flux). This
would become problematic for s390x as unfortunately AER recovery will
not work for zPCI devices due to platform firmware being involved in the
recovery process.
> 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.
>
I would like to get some feedback from Alex to see if we could extend
the ABI.
Thanks
Farhan
> Thanks,
>
> C.
>
> [1]
> https://lore.kernel.org/all/20260901093217.8539-1-skolothumtho@nvidia.com/
> [2]
> https://github.com/shamiali2008/qemu-master/commit/e45458710cd8509fa5bd81f4376126b77b6f40be
>
>
next prev parent reply other threads:[~2026-09-03 17:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-09-08 19:25 ` Farhan Ali
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=e6dfaf88-e1af-4744-baa2-ef1d760e0bd0@linux.ibm.com \
--to=alifm@linux.ibm.com \
--cc=alex@shazbot.org \
--cc=armbru@redhat.com \
--cc=clg@redhat.com \
--cc=cohuck@redhat.com \
--cc=farman@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=skolothumtho@nvidia.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 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.