From: Farhan Ali <alifm@linux.ibm.com>
To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org
Cc: mjrosato@linux.ibm.com, alifm@linux.ibm.com, thuth@redhat.com,
alex.williamson@redhat.com, clg@redhat.com
Subject: [PATCH v3 3/5] vfio: Introduce vfio_device_feature helper function
Date: Thu, 25 Sep 2025 10:48:50 -0700 [thread overview]
Message-ID: <20250925174852.1302-4-alifm@linux.ibm.com> (raw)
In-Reply-To: <20250925174852.1302-1-alifm@linux.ibm.com>
Introduce a helper function to call internal VFIODeviceIOOps
device_feature().
Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
---
hw/vfio/device.c | 6 ++++++
include/hw/vfio/vfio-device.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/hw/vfio/device.c b/hw/vfio/device.c
index 08f12ac31f..2ea2af3f79 100644
--- a/hw/vfio/device.c
+++ b/hw/vfio/device.c
@@ -504,6 +504,12 @@ void vfio_device_unprepare(VFIODevice *vbasedev)
vbasedev->bcontainer = NULL;
}
+int vfio_device_feature(VFIODevice *vbasedev,
+ struct vfio_device_feature *feature)
+{
+ return vbasedev->io_ops->device_feature(vbasedev, feature);
+}
+
/*
* Traditional ioctl() based io
*/
diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h
index e7e6243e2d..a7f00d2a80 100644
--- a/include/hw/vfio/vfio-device.h
+++ b/include/hw/vfio/vfio-device.h
@@ -157,6 +157,8 @@ bool vfio_device_attach_by_iommu_type(const char *iommu_type, char *name,
Error **errp);
void vfio_device_detach(VFIODevice *vbasedev);
VFIODevice *vfio_get_vfio_device(Object *obj);
+int vfio_device_feature(VFIODevice *vbasedev,
+ struct vfio_device_feature *feat);
typedef QLIST_HEAD(VFIODeviceList, VFIODevice) VFIODeviceList;
extern VFIODeviceList vfio_device_list;
--
2.43.0
next prev parent reply other threads:[~2025-09-25 17:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 17:48 [PATCH v3 0/5] Error recovery for zPCI passthrough devices Farhan Ali
2025-09-25 17:48 ` [PATCH v3 1/5] [NOTFORMERGE] linux-headers: Update for zpci vfio device Farhan Ali
2025-09-25 17:48 ` [PATCH v3 2/5] vfio/pci: Add an error handler callback Farhan Ali
2025-09-26 4:57 ` Markus Armbruster
2025-09-26 7:40 ` Cédric Le Goater
2025-09-26 18:44 ` Farhan Ali
2025-09-26 17:53 ` Farhan Ali
2025-09-27 5:59 ` Markus Armbruster
2025-09-27 7:05 ` Cédric Le Goater
2025-09-29 17:20 ` Farhan Ali
2025-09-30 9:20 ` Markus Armbruster
2025-09-30 17:15 ` Farhan Ali
2025-10-01 4:52 ` Markus Armbruster
2025-10-01 18:21 ` Farhan Ali
2025-10-06 6:06 ` Markus Armbruster
2025-09-25 17:48 ` Farhan Ali [this message]
2025-09-25 17:48 ` [PATCH v3 4/5] s390x/pci: Add PCI error handling for vfio pci devices Farhan Ali
2025-09-25 17:48 ` [PATCH v3 5/5] s390x/pci: Reset a device in error state 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=20250925174852.1302-4-alifm@linux.ibm.com \
--to=alifm@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=clg@redhat.com \
--cc=mjrosato@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).