From: Alex Williamson <alex@shazbot.org>
To: Farhan Ali <alifm@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, helgaas@kernel.org,
schnelle@linux.ibm.com, mjrosato@linux.ibm.com, alex@shazbot.org
Subject: Re: [PATCH v18 1/4] s390/pci: Store PCI error information for passthrough devices
Date: Thu, 4 Jun 2026 12:27:59 -0600 [thread overview]
Message-ID: <20260604122759.34f43e25@shazbot.org> (raw)
In-Reply-To: <d352f011-3c47-475a-b0a3-6005e56ef21d@linux.ibm.com>
On Wed, 3 Jun 2026 16:35:11 -0700
Farhan Ali <alifm@linux.ibm.com> wrote:
> On 6/3/2026 3:20 PM, Alex Williamson wrote:
> > On Wed, 3 Jun 2026 11:24:12 -0700
> > Farhan Ali <alifm@linux.ibm.com> wrote:
> >> @@ -266,25 +286,19 @@ static pci_ers_result_t zpci_event_attempt_error_recovery(struct pci_dev *pdev)
> >> * @pdev: PCI function for which to report
> >> * @es: PCI channel failure state to report
> >> */
> >> -static void zpci_event_io_failure(struct pci_dev *pdev, pci_channel_state_t es)
> >> +static void zpci_event_io_failure(struct pci_dev *pdev, pci_channel_state_t es,
> >> + struct zpci_ccdf_err *ccdf)
> >> {
> >> struct pci_driver *driver;
> >>
> >> pci_dev_lock(pdev);
> >> pdev->error_state = es;
> >> - /**
> >> - * While vfio-pci's error_detected callback notifies user-space QEMU
> >> - * reacts to this by freezing the guest. In an s390 environment PCI
> >> - * errors are rarely fatal so this is overkill. Instead in the future
> >> - * we will inject the error event and let the guest recover the device
> >> - * itself.
> >> - */
> >> - if (is_passed_through(pdev))
> >> - goto out;
> >> +
> >> + zpci_store_pci_error(pdev, ccdf);
> >> driver = to_pci_driver(pdev->dev.driver);
> >> if (driver && driver->err_handler && driver->err_handler->error_detected)
> >> driver->err_handler->error_detected(pdev, pdev->error_state);
> > How do you intend to stage this versus QEMU changes? This seems like a
> > big regression if we're suddenly triggering the eventfd that causes
> > QEMU to halt. Do you need userspace to opt-in to mediated recovery
> > rather than automatically enabling it on open? Thanks,
> >
> > Alex
>
> AFAIU userspace registering an eventfd to receive notification for error
> events is an opt-in? And yes for QEMU the current behavior halts the
> guest, but even today on an error device becomes unusable and requires
> manual intervention. I am not sure if we need to add another opt-in
> mechanism for QEMU.
Yes, QEMU is performing an opt-in, but we're also now calling through
to that opt-in in more cases. Arguably this is coming more in line
with AER handling where I believe only uncorrected errors trigger this
path and we signal through the error eventfd for all uncorrected AER
errors. So long as you've considered the implications for existing
userspace, I won't object. Thanks,
Alex
next prev parent reply other threads:[~2026-06-04 18:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 18:24 [PATCH v18 0/4] [VFIO] Error recovery for vfio-pci devices on s390x Farhan Ali
2026-06-03 18:24 ` [PATCH v18 1/4] s390/pci: Store PCI error information for passthrough devices Farhan Ali
2026-06-03 22:20 ` Alex Williamson
2026-06-03 23:35 ` Farhan Ali
2026-06-04 18:27 ` Alex Williamson [this message]
2026-06-03 18:24 ` [PATCH v18 2/4] vfio-pci/zdev: Add a device feature for error information Farhan Ali
2026-06-03 18:49 ` sashiko-bot
2026-06-03 22:37 ` Alex Williamson
2026-06-03 23:40 ` Farhan Ali
2026-06-03 18:24 ` [PATCH v18 3/4] vfio/pci: Add a reset_done callback for vfio-pci driver Farhan Ali
2026-06-03 19:04 ` sashiko-bot
2026-06-03 22:46 ` Alex Williamson
2026-06-04 0:01 ` Farhan Ali
2026-06-04 8:28 ` Keith Busch
2026-06-04 17:17 ` Farhan Ali
2026-06-04 19:57 ` Alex Williamson
2026-06-08 19:26 ` Farhan Ali
2026-06-09 19:16 ` Alex Williamson
2026-06-09 20:13 ` Farhan Ali
2026-06-04 20:42 ` Keith Busch
2026-06-05 18:41 ` Farhan Ali
2026-06-09 21:38 ` Keith Busch
2026-06-03 18:24 ` [PATCH v18 4/4] vfio/pci: Remove the pcie check for VFIO_PCI_ERR_IRQ_INDEX 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=20260604122759.34f43e25@shazbot.org \
--to=alex@shazbot.org \
--cc=alifm@linux.ibm.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=schnelle@linux.ibm.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.