summary refs log tree commit diff stats
path: root/hw/vfio/types.h
diff options
context:
space:
mode:
authorShaoqin Huang <shahuang@redhat.com>2025-07-17 06:09:40 -0400
committerGerd Hoffmann <kraxel@redhat.com>2025-07-18 21:41:45 +0200
commitb53a3bba5e02df7cbdb26f8bf8bcb11b8290e863 (patch)
tree3f72d83f06363cc907e9e135f12eda7d34a7bdb7 /hw/vfio/types.h
parent350785d41d8bb0b799dd16ea04a7232dc8d6093a (diff)
downloadfocaccia-qemu-b53a3bba5e02df7cbdb26f8bf8bcb11b8290e863.tar.gz
focaccia-qemu-b53a3bba5e02df7cbdb26f8bf8bcb11b8290e863.zip
vfio: Move the TYPE_* to hw/vfio/types.h
Move the TYPE_* to a new file hw/vfio/types.h because the
TYPE_VFIO_PCI will be used in later patch, but directly include the
hw/vfio/pci.h can cause some compilation error when cross build the
windows version.

The hw/vfio/types.h can be included to mitigate that problem.

Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
Message-ID: <20250717100941.2230408-3-shahuang@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/vfio/types.h')
-rw-r--r--hw/vfio/types.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/vfio/types.h b/hw/vfio/types.h
new file mode 100644
index 0000000000..fa20c29b9f
--- /dev/null
+++ b/hw/vfio/types.h
@@ -0,0 +1,21 @@
+/*
+ * VFIO types definition
+ *
+ * Copyright Red Hat, Inc. 2025
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#ifndef HW_VFIO_VFIO_TYPES_H
+#define HW_VFIO_VFIO_TYPES_H
+
+/*
+ * TYPE_VFIO_PCI_BASE is an abstract type used to share code
+ * between VFIO implementations that use a kernel driver
+ * with those that use user sockets.
+ */
+#define TYPE_VFIO_PCI_BASE "vfio-pci-base"
+
+#define TYPE_VFIO_PCI "vfio-pci"
+/* TYPE_VFIO_PCI shares struct VFIOPCIDevice. */
+
+#endif /* HW_VFIO_VFIO_TYPES_H */