Re: [PATCH v17 4/7] s390/pci: Store PCI error information for passthrough devices
From: Niklas Schnelle
Date: Wed May 20 2026 - 15:43:41 EST
On Wed, 2026-05-20 at 10:11 -0700, Farhan Ali wrote:
> For a passthrough device we need co-operation from user space to recover
> the device. This would require to bubble up any error information to user
> space. Let's store this error information for passthrough devices, so it
> can be retrieved later.
>
> We can now have userspace drivers (vfio-pci based) on s390x. The userspace
> drivers will not have any KVM fd and so no kzdev associated with them. So
> we need to update the logic for detecting passthrough devices to not depend
> on struct kvm_zdev.
>
> Reviewed-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>
> Signed-off-by: Farhan Ali <alifm@xxxxxxxxxxxxx>
> ---
> arch/s390/include/asm/pci.h | 30 ++++++++
> arch/s390/pci/pci.c | 1 +
> arch/s390/pci/pci_event.c | 116 +++++++++++++++++--------------
> drivers/vfio/pci/vfio_pci_zdev.c | 18 ++++-
> 4 files changed, 111 insertions(+), 54 deletions(-)
>
Looks good to me now and I do think the zpci_store_pci_error() makes
the code easier to read and gives a clear destinction for mediated
recovery mode. Oh and Sashiko just came back with no issues found too.
Feel free to add my:
Reviewed-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
Thanks,
Niklas