aboutsummaryrefslogtreecommitdiff
path: root/hw/hyperv
diff options
context:
space:
mode:
Diffstat (limited to 'hw/hyperv')
-rw-r--r--hw/hyperv/hyperv.c9
-rw-r--r--hw/hyperv/hyperv_testdev.c5
2 files changed, 9 insertions, 5 deletions
diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c
index 844d00776d..aa5a2a9bd8 100644
--- a/hw/hyperv/hyperv.c
+++ b/hw/hyperv/hyperv.c
@@ -20,8 +20,9 @@
#include "qemu/rcu.h"
#include "qemu/rcu_queue.h"
#include "hw/hyperv/hyperv.h"
+#include "qom/object.h"
-typedef struct SynICState {
+struct SynICState {
DeviceState parent_obj;
CPUState *cs;
@@ -33,10 +34,12 @@ typedef struct SynICState {
MemoryRegion event_page_mr;
struct hyperv_message_page *msg_page;
struct hyperv_event_flags_page *event_page;
-} SynICState;
+};
+typedef struct SynICState SynICState;
#define TYPE_SYNIC "hyperv-synic"
-#define SYNIC(obj) OBJECT_CHECK(SynICState, (obj), TYPE_SYNIC)
+DECLARE_INSTANCE_CHECKER(SynICState, SYNIC,
+ TYPE_SYNIC)
static bool synic_enabled;
diff --git a/hw/hyperv/hyperv_testdev.c b/hw/hyperv/hyperv_testdev.c
index 88a5a63782..f6ee98e00c 100644
--- a/hw/hyperv/hyperv_testdev.c
+++ b/hw/hyperv/hyperv_testdev.c
@@ -17,6 +17,7 @@
#include "qemu/queue.h"
#include "hw/isa/isa.h"
#include "hw/hyperv/hyperv.h"
+#include "qom/object.h"
typedef struct TestSintRoute {
QLIST_ENTRY(TestSintRoute) le;
@@ -49,8 +50,8 @@ struct HypervTestDev {
typedef struct HypervTestDev HypervTestDev;
#define TYPE_HYPERV_TEST_DEV "hyperv-testdev"
-#define HYPERV_TEST_DEV(obj) \
- OBJECT_CHECK(HypervTestDev, (obj), TYPE_HYPERV_TEST_DEV)
+DECLARE_INSTANCE_CHECKER(HypervTestDev, HYPERV_TEST_DEV,
+ TYPE_HYPERV_TEST_DEV)
enum {
HV_TEST_DEV_SINT_ROUTE_CREATE = 1,