aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-25 15:20:30 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-08-27 14:04:54 -0400
commit240b6cd71798e423f55b347bba6bf05da2da7e18 (patch)
tree09c65b76b52bf5376cb92ae221f4a79f911f1e60
parent41ea82055c7cd5dbcdeb61236eae4272a64bb5f6 (diff)
downloadqemu-240b6cd71798e423f55b347bba6bf05da2da7e18.zip
qemu-240b6cd71798e423f55b347bba6bf05da2da7e18.tar.gz
qemu-240b6cd71798e423f55b347bba6bf05da2da7e18.tar.bz2
vmbus: Move QOM macros to vmbus.h
Move all declarations related to TYPE_VMBUS to the same place in vmbus.h. This will make future conversion to OBJECT_DECLARE* easier. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Tested-By: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200825192110.3528606-35-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--hw/hyperv/vmbus.c3
-rw-r--r--include/hw/hyperv/vmbus-bridge.h3
-rw-r--r--include/hw/hyperv/vmbus.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
index 34392e8..75af6b8 100644
--- a/hw/hyperv/vmbus.c
+++ b/hw/hyperv/vmbus.c
@@ -20,9 +20,6 @@
#include "cpu.h"
#include "trace.h"
-#define TYPE_VMBUS "vmbus"
-#define VMBUS(obj) OBJECT_CHECK(VMBus, (obj), TYPE_VMBUS)
-
enum {
VMGPADL_INIT,
VMGPADL_ALIVE,
diff --git a/include/hw/hyperv/vmbus-bridge.h b/include/hw/hyperv/vmbus-bridge.h
index 33f93de..fe90bda 100644
--- a/include/hw/hyperv/vmbus-bridge.h
+++ b/include/hw/hyperv/vmbus-bridge.h
@@ -11,11 +11,10 @@
#define HW_HYPERV_VMBUS_BRIDGE_H
#include "hw/sysbus.h"
+#include "hw/hyperv/vmbus.h"
#define TYPE_VMBUS_BRIDGE "vmbus-bridge"
-typedef struct VMBus VMBus;
-
typedef struct VMBusBridge {
SysBusDevice parent_obj;
diff --git a/include/hw/hyperv/vmbus.h b/include/hw/hyperv/vmbus.h
index 40e8417..cd98ec2 100644
--- a/include/hw/hyperv/vmbus.h
+++ b/include/hw/hyperv/vmbus.h
@@ -26,6 +26,10 @@
#define VMBUS_DEVICE_GET_CLASS(obj) \
OBJECT_GET_CLASS(VMBusDeviceClass, (obj), TYPE_VMBUS_DEVICE)
+#define TYPE_VMBUS "vmbus"
+typedef struct VMBus VMBus;
+#define VMBUS(obj) OBJECT_CHECK(VMBus, (obj), TYPE_VMBUS)
+
/*
* Object wrapping a GPADL -- GPA Descriptor List -- an array of guest physical
* pages, to be used for various buffers shared between the host and the guest.