aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio
diff options
context:
space:
mode:
Diffstat (limited to 'hw/vfio')
-rw-r--r--hw/vfio/ap.c6
-rw-r--r--hw/vfio/pci.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index cec6fe1..eb74e57 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -28,13 +28,15 @@
#include "hw/qdev-properties.h"
#include "hw/s390x/ap-bridge.h"
#include "exec/address-spaces.h"
+#include "qom/object.h"
#define VFIO_AP_DEVICE_TYPE "vfio-ap"
-typedef struct VFIOAPDevice {
+struct VFIOAPDevice {
APDevice apdev;
VFIODevice vdev;
-} VFIOAPDevice;
+};
+typedef struct VFIOAPDevice VFIOAPDevice;
#define VFIO_AP_DEVICE(obj) \
OBJECT_CHECK(VFIOAPDevice, (obj), VFIO_AP_DEVICE_TYPE)
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 3c0dca0..8c1f941 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -18,6 +18,7 @@
#include "qemu/event_notifier.h"
#include "qemu/queue.h"
#include "qemu/timer.h"
+#include "qom/object.h"
#define PCI_ANY_ID (~0)
@@ -114,9 +115,10 @@ typedef struct VFIOMSIXInfo {
} VFIOMSIXInfo;
#define TYPE_VFIO_PCI "vfio-pci"
+typedef struct VFIOPCIDevice VFIOPCIDevice;
#define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI)
-typedef struct VFIOPCIDevice {
+struct VFIOPCIDevice {
PCIDevice pdev;
VFIODevice vbasedev;
VFIOINTx intx;
@@ -173,7 +175,7 @@ typedef struct VFIOPCIDevice {
VFIODisplay *dpy;
Error *migration_blocker;
Notifier irqchip_change_notifier;
-} VFIOPCIDevice;
+};
/* Use uin32_t for vendor & device so PCI_ANY_ID expands and cannot match hw */
static inline bool vfio_pci_is(VFIOPCIDevice *vdev, uint32_t vendor, uint32_t device)