From: Farhan Ali <alifm@linux.ibm.com>
To: Alex Williamson <alex@shazbot.org>
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
Subject: Re: [PATCH v18 2/4] vfio-pci/zdev: Add a device feature for error information
Date: Wed, 3 Jun 2026 16:40:01 -0700 [thread overview]
Message-ID: <94fddb17-f4f1-4769-b73b-fb3523c37af2@linux.ibm.com> (raw)
In-Reply-To: <20260603163701.2d96ddcd@shazbot.org>
On 6/3/2026 3:37 PM, Alex Williamson wrote:
> On Wed, 3 Jun 2026 11:24:13 -0700
> Farhan Ali <alifm@linux.ibm.com> wrote:
>> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
>> index 5de618a3a5ee..3eead86a00ab 100644
>> --- a/include/uapi/linux/vfio.h
>> +++ b/include/uapi/linux/vfio.h
>> @@ -1534,6 +1534,36 @@ struct vfio_device_feature_dma_buf {
>> */
>> #define VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2 12
>>
>> +/**
>> + * VFIO_DEVICE_FEATURE_ZPCI_ERROR feature provides PCI error information to
>> + * userspace for vfio-pci devices on s390. On s390, PCI error recovery
>> + * involves platform firmware and notification to operating systems is done
>> + * by architecture specific mechanism. Exposing this information to
>> + * userspace allows it to take appropriate actions to handle an
>> + * error on the device. The ioctl returns -ENOMSG if there are no pending
>> + * PCI errors.
>> + */
>> +
>> +struct vfio_device_feature_zpci_err {
>> + __u32 feature_flags; /* Indicate future features */
>> + __u32 reserved1;
>> + __u32 fh; /* function handle */
>> + __u32 fid; /* function id */
>> + __u32 ett : 4; /* expected table type */
>> + __u32 mvn : 12; /* MSI vector number */
>> + __u32 dmaas : 8; /* DMA address space */
>> + __u32 reserved2 : 6;
>> + __u32 q : 1; /* event qualifier */
>> + __u32 rw : 1; /* read/write */
> There's a 4-byte hole here.
>
>> + __u64 faddr; /* failing address */
>> + __u32 reserved3;
>> + __u16 reserved4;
>> + __u16 pec; /* PCI event code */
>> + __u8 reserved5[28]; /* Allow for future expansion */
>> +};
>> +
>> +#define VFIO_DEVICE_FEATURE_ZPCI_ERROR 13
> Based on the discussion with Omar and FMB reporting, I don't suppose
> this could also be copied to a user buffer as opaque data with size
> reported elsewhere, could it? Thanks,
>
> Alex
We currently don't expose any PCI error data to userspace and so
userspace has no way of knowing the size of the buffer. Unless we
provide the size, i don't think we can copy the user buffer as opaque data.
Thanks
Farhan
next prev parent reply other threads:[~2026-06-03 23:40 UTC|newest]
Thread overview: 21+ 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
2026-06-03 18:24 ` [PATCH v18 2/4] vfio-pci/zdev: Add a device feature for error information Farhan Ali
2026-06-03 22:37 ` Alex Williamson
2026-06-03 23:40 ` Farhan Ali [this message]
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 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=94fddb17-f4f1-4769-b73b-fb3523c37af2@linux.ibm.com \
--to=alifm@linux.ibm.com \
--cc=alex@shazbot.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox