[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 42/58] vfio/pci: Move QOM macros to header
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 42/58] vfio/pci: Move QOM macros to header |
Date: |
Wed, 19 Aug 2020 20:12:20 -0400 |
This will make future conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2: new patch in series v2
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/vfio/pci.h | 3 +++
hw/vfio/pci.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 0da7a20a7e..3c0dca024b 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -113,6 +113,9 @@ typedef struct VFIOMSIXInfo {
unsigned long *pending;
} VFIOMSIXInfo;
+#define TYPE_VFIO_PCI "vfio-pci"
+#define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI)
+
typedef struct VFIOPCIDevice {
PCIDevice pdev;
VFIODevice vbasedev;
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 2e561c06d6..3611dcd38b 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -42,9 +42,6 @@
#include "qapi/error.h"
#include "migration/blocker.h"
-#define TYPE_VFIO_PCI "vfio-pci"
-#define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI)
-
#define TYPE_VFIO_PCI_NOHOTPLUG "vfio-pci-nohotplug"
static void vfio_disable_interrupts(VFIOPCIDevice *vdev);
--
2.26.2
- [PATCH v2 37/58] auxbus: Move QOM macros to header, (continued)
- [PATCH v2 37/58] auxbus: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 38/58] rocker: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 39/58] pxa2xx: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 40/58] mptsas: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 41/58] kvm: Move QOM macros to kvm.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 42/58] vfio/pci: Move QOM macros to header,
Eduardo Habkost <=
- [PATCH v2 43/58] qom: make object_ref/unref use a void * instead of Object *., Eduardo Habkost, 2020/08/19
- [PATCH v2 45/58] qom: Allow class type name to be specified in OBJECT_DECLARE*, Eduardo Habkost, 2020/08/19
- [PATCH v2 47/58] qom: Make type checker functions accept const pointers, Eduardo Habkost, 2020/08/19
- [PATCH v2 46/58] qom: DECLARE_*_CHECKERS macros, Eduardo Habkost, 2020/08/19
- [PATCH v2 48/58] qom: TYPE_INFO macro, Eduardo Habkost, 2020/08/19
- [PATCH v2 50/58] [automated] Delete duplicate QOM typedefs, Eduardo Habkost, 2020/08/19
- [PATCH v2 44/58] qom: provide convenient macros for declaring and defining types, Eduardo Habkost, 2020/08/19