diff --git a/.gitignore b/.gitignore
index 5e9092bd..377e0a28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,9 +31,11 @@ qemu/x86_64-softmmu/
qemu/qapi-builtin-types.[ch]
qemu/qapi-builtin-visit.[ch]
qemu/qapi/qapi-types-common.[ch]
+qemu/qapi/qapi-types-misc.[ch]
qemu/qapi/qapi-visit-common.[ch]
qemu/qapi-types.[ch]
qemu/qapi-visit.[ch]
+qemu/qapi/qapi-visit-misc.[ch]
qemu/qapi-gen-timestamp
tags
qemu/config-host.ld
diff --git a/msvc/unicorn/qapi-types-common.c b/msvc/unicorn/qapi/qapi-types-common.c
similarity index 100%
rename from msvc/unicorn/qapi-types-common.c
rename to msvc/unicorn/qapi/qapi-types-common.c
diff --git a/msvc/unicorn/qapi-types-common.h b/msvc/unicorn/qapi/qapi-types-common.h
similarity index 100%
rename from msvc/unicorn/qapi-types-common.h
rename to msvc/unicorn/qapi/qapi-types-common.h
diff --git a/msvc/unicorn/qapi/qapi-types-misc.c b/msvc/unicorn/qapi/qapi-types-misc.c
new file mode 100644
index 00000000..52a0d06a
--- /dev/null
+++ b/msvc/unicorn/qapi/qapi-types-misc.c
@@ -0,0 +1,69 @@
+/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
+
+/*
+ * Schema-defined QAPI types
+ *
+ * Copyright IBM, Corp. 2011
+ * Copyright (c) 2013-2018 Red Hat Inc.
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
+ * See the COPYING.LIB file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/dealloc-visitor.h"
+#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-visit-misc.h"
+
+const char *const X86CPURegister32_lookup[] = {
+ "EAX",
+ "EBX",
+ "ECX",
+ "EDX",
+ "ESP",
+ "EBP",
+ "ESI",
+ "EDI",
+ NULL,
+};
+
+void qapi_free_X86CPUFeatureWordInfo(X86CPUFeatureWordInfo *obj)
+{
+ Visitor *v;
+
+ if (!obj) {
+ return;
+ }
+
+ v = qapi_dealloc_visitor_new();
+ visit_type_X86CPUFeatureWordInfo(v, NULL, &obj, NULL);
+ visit_free(v);
+}
+
+void qapi_free_X86CPUFeatureWordInfoList(X86CPUFeatureWordInfoList *obj)
+{
+ Visitor *v;
+
+ if (!obj) {
+ return;
+ }
+
+ v = qapi_dealloc_visitor_new();
+ visit_type_X86CPUFeatureWordInfoList(v, NULL, &obj, NULL);
+ visit_free(v);
+}
+
+void qapi_free_DummyForceArrays(DummyForceArrays *obj)
+{
+ Visitor *v;
+
+ if (!obj) {
+ return;
+ }
+
+ v = qapi_dealloc_visitor_new();
+ visit_type_DummyForceArrays(v, NULL, &obj, NULL);
+ visit_free(v);
+}
+/* Dummy declaration to prevent empty .o file */
+char dummy_qapi_qapi_types_misc_c;
diff --git a/msvc/unicorn/qapi/qapi-types-misc.h b/msvc/unicorn/qapi/qapi-types-misc.h
new file mode 100644
index 00000000..3b3e178f
--- /dev/null
+++ b/msvc/unicorn/qapi/qapi-types-misc.h
@@ -0,0 +1,61 @@
+/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
+
+/*
+ * Schema-defined QAPI types
+ *
+ * Copyright IBM, Corp. 2011
+ * Copyright (c) 2013-2018 Red Hat Inc.
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
+ * See the COPYING.LIB file in the top-level directory.
+ */
+
+#ifndef QAPI_QAPI_TYPES_MISC_H
+#define QAPI_QAPI_TYPES_MISC_H
+
+#include "qapi-builtin-types.h"
+
+typedef enum X86CPURegister32 {
+ X86_CPU_REGISTER32_EAX = 0,
+ X86_CPU_REGISTER32_EBX = 1,
+ X86_CPU_REGISTER32_ECX = 2,
+ X86_CPU_REGISTER32_EDX = 3,
+ X86_CPU_REGISTER32_ESP = 4,
+ X86_CPU_REGISTER32_EBP = 5,
+ X86_CPU_REGISTER32_ESI = 6,
+ X86_CPU_REGISTER32_EDI = 7,
+ X86_CPU_REGISTER32__MAX = 8,
+} X86CPURegister32;
+
+extern const char *const X86CPURegister32_lookup[];
+
+typedef struct X86CPUFeatureWordInfo X86CPUFeatureWordInfo;
+
+typedef struct X86CPUFeatureWordInfoList X86CPUFeatureWordInfoList;
+
+typedef struct DummyForceArrays DummyForceArrays;
+
+struct X86CPUFeatureWordInfo {
+ int64_t cpuid_input_eax;
+ bool has_cpuid_input_ecx;
+ int64_t cpuid_input_ecx;
+ X86CPURegister32 cpuid_register;
+ int64_t features;
+};
+
+void qapi_free_X86CPUFeatureWordInfo(X86CPUFeatureWordInfo *obj);
+
+struct X86CPUFeatureWordInfoList {
+ X86CPUFeatureWordInfoList *next;
+ X86CPUFeatureWordInfo *value;
+};
+
+void qapi_free_X86CPUFeatureWordInfoList(X86CPUFeatureWordInfoList *obj);
+
+struct DummyForceArrays {
+ X86CPUFeatureWordInfoList *unused;
+};
+
+void qapi_free_DummyForceArrays(DummyForceArrays *obj);
+
+#endif /* QAPI_QAPI_TYPES_MISC_H */
diff --git a/msvc/unicorn/qapi-visit-common.c b/msvc/unicorn/qapi/qapi-visit-common.c
similarity index 100%
rename from msvc/unicorn/qapi-visit-common.c
rename to msvc/unicorn/qapi/qapi-visit-common.c
diff --git a/msvc/unicorn/qapi-visit-common.h b/msvc/unicorn/qapi/qapi-visit-common.h
similarity index 100%
rename from msvc/unicorn/qapi-visit-common.h
rename to msvc/unicorn/qapi/qapi-visit-common.h
diff --git a/msvc/unicorn/qapi/qapi-visit-misc.c b/msvc/unicorn/qapi/qapi-visit-misc.c
new file mode 100644
index 00000000..e7c71c97
--- /dev/null
+++ b/msvc/unicorn/qapi/qapi-visit-misc.c
@@ -0,0 +1,149 @@
+/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
+
+/*
+ * Schema-defined QAPI visitors
+ *
+ * Copyright IBM, Corp. 2011
+ * Copyright (C) 2014-2018 Red Hat, Inc.
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
+ * See the COPYING.LIB file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "qapi/error.h"
+#include "qapi/qmp/qerror.h"
+#include "qapi/qapi-visit-misc.h"
+
+void visit_type_X86CPURegister32(Visitor *v, const char *name, X86CPURegister32 *obj, Error **errp)
+{
+ int value = *obj;
+ visit_type_enum(v, name, &value, X86CPURegister32_lookup, errp);
+ *obj = value;
+}
+
+void visit_type_X86CPUFeatureWordInfo_members(Visitor *v, X86CPUFeatureWordInfo *obj, Error **errp)
+{
+ Error *err = NULL;
+
+ visit_type_int(v, "cpuid-input-eax", &obj->cpuid_input_eax, &err);
+ if (err) {
+ goto out;
+ }
+ if (visit_optional(v, "cpuid-input-ecx", &obj->has_cpuid_input_ecx)) {
+ visit_type_int(v, "cpuid-input-ecx", &obj->cpuid_input_ecx, &err);
+ if (err) {
+ goto out;
+ }
+ }
+ visit_type_X86CPURegister32(v, "cpuid-register", &obj->cpuid_register, &err);
+ if (err) {
+ goto out;
+ }
+ visit_type_int(v, "features", &obj->features, &err);
+ if (err) {
+ goto out;
+ }
+
+out:
+ error_propagate(errp, err);
+}
+
+void visit_type_X86CPUFeatureWordInfo(Visitor *v, const char *name, X86CPUFeatureWordInfo **obj, Error **errp)
+{
+ Error *err = NULL;
+
+ visit_start_struct(v, name, (void **)obj, sizeof(X86CPUFeatureWordInfo), &err);
+ if (err) {
+ goto out;
+ }
+ if (!*obj) {
+ goto out_obj;
+ }
+ visit_type_X86CPUFeatureWordInfo_members(v, *obj, &err);
+ if (err) {
+ goto out_obj;
+ }
+ visit_check_struct(v, &err);
+out_obj:
+ visit_end_struct(v, (void **)obj);
+ if (err && visit_is_input(v)) {
+ qapi_free_X86CPUFeatureWordInfo(*obj);
+ *obj = NULL;
+ }
+out:
+ error_propagate(errp, err);
+}
+
+void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name, X86CPUFeatureWordInfoList **obj, Error **errp)
+{
+ Error *err = NULL;
+ X86CPUFeatureWordInfoList *tail;
+ size_t size = sizeof(**obj);
+
+ visit_start_list(v, name, (GenericList **)obj, size, &err);
+ if (err) {
+ goto out;
+ }
+
+ for (tail = *obj; tail;
+ tail = (X86CPUFeatureWordInfoList *)visit_next_list(v, (GenericList *)tail, size)) {
+ visit_type_X86CPUFeatureWordInfo(v, NULL, &tail->value, &err);
+ if (err) {
+ break;
+ }
+ }
+
+ if (!err) {
+ visit_check_list(v, &err);
+ }
+ visit_end_list(v, (void **)obj);
+ if (err && visit_is_input(v)) {
+ qapi_free_X86CPUFeatureWordInfoList(*obj);
+ *obj = NULL;
+ }
+out:
+ error_propagate(errp, err);
+}
+
+void visit_type_DummyForceArrays_members(Visitor *v, DummyForceArrays *obj, Error **errp)
+{
+ Error *err = NULL;
+
+ visit_type_X86CPUFeatureWordInfoList(v, "unused", &obj->unused, &err);
+ if (err) {
+ goto out;
+ }
+
+out:
+ error_propagate(errp, err);
+}
+
+void visit_type_DummyForceArrays(Visitor *v, const char *name, DummyForceArrays **obj, Error **errp)
+{
+ Error *err = NULL;
+
+ visit_start_struct(v, name, (void **)obj, sizeof(DummyForceArrays), &err);
+ if (err) {
+ goto out;
+ }
+ if (!*obj) {
+ goto out_obj;
+ }
+ visit_type_DummyForceArrays_members(v, *obj, &err);
+ if (err) {
+ goto out_obj;
+ }
+ visit_check_struct(v, &err);
+out_obj:
+ visit_end_struct(v, (void **)obj);
+ if (err && visit_is_input(v)) {
+ qapi_free_DummyForceArrays(*obj);
+ *obj = NULL;
+ }
+out:
+ error_propagate(errp, err);
+}
+/* Dummy declaration to prevent empty .o file */
+char dummy_qapi_qapi_visit_misc_c;
diff --git a/msvc/unicorn/qapi/qapi-visit-misc.h b/msvc/unicorn/qapi/qapi-visit-misc.h
new file mode 100644
index 00000000..ab4f58ed
--- /dev/null
+++ b/msvc/unicorn/qapi/qapi-visit-misc.h
@@ -0,0 +1,28 @@
+/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
+
+/*
+ * Schema-defined QAPI visitors
+ *
+ * Copyright IBM, Corp. 2011
+ * Copyright (C) 2014-2018 Red Hat, Inc.
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
+ * See the COPYING.LIB file in the top-level directory.
+ */
+
+#ifndef QAPI_QAPI_VISIT_MISC_H
+#define QAPI_QAPI_VISIT_MISC_H
+
+#include "qapi-builtin-visit.h"
+#include "qapi/qapi-types-misc.h"
+
+void visit_type_X86CPURegister32(Visitor *v, const char *name, X86CPURegister32 *obj, Error **errp);
+
+void visit_type_X86CPUFeatureWordInfo_members(Visitor *v, X86CPUFeatureWordInfo *obj, Error **errp);
+void visit_type_X86CPUFeatureWordInfo(Visitor *v, const char *name, X86CPUFeatureWordInfo **obj, Error **errp);
+void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name, X86CPUFeatureWordInfoList **obj, Error **errp);
+
+void visit_type_DummyForceArrays_members(Visitor *v, DummyForceArrays *obj, Error **errp);
+void visit_type_DummyForceArrays(Visitor *v, const char *name, DummyForceArrays **obj, Error **errp);
+
+#endif /* QAPI_QAPI_VISIT_MISC_H */
diff --git a/msvc/unicorn/unicorn/unicorn.vcxproj b/msvc/unicorn/unicorn/unicorn.vcxproj
index 895e9b8d..535a3f67 100644
--- a/msvc/unicorn/unicorn/unicorn.vcxproj
+++ b/msvc/unicorn/unicorn/unicorn.vcxproj
@@ -238,8 +238,10 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
-
-
+
+
+
+
@@ -368,8 +370,10 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
-
-
+
+
+
+
diff --git a/msvc/unicorn/unicorn/unicorn.vcxproj.filters b/msvc/unicorn/unicorn/unicorn.vcxproj.filters
index 7e2d7ca6..ee881a74 100644
--- a/msvc/unicorn/unicorn/unicorn.vcxproj.filters
+++ b/msvc/unicorn/unicorn/unicorn.vcxproj.filters
@@ -138,10 +138,16 @@
qemu
-
+
qemu
-
+
+ qemu
+
+
+ qemu
+
+
qemu
@@ -244,10 +250,16 @@
qemu
-
+
qemu
-
+
+ qemu
+
+
+ qemu
+
+
qemu
diff --git a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj
index 8969d541..547ab6d9 100644
--- a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj
+++ b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj
@@ -66,6 +66,8 @@
+
+
@@ -181,8 +183,10 @@
-
-
+
+
+
+
diff --git a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters
index f96fcc6d..f038b658 100644
--- a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters
+++ b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters
@@ -211,10 +211,16 @@
qemu
-
+
qemu
-
+
+ qemu
+
+
+ qemu
+
+
qemu
@@ -536,10 +542,16 @@
qemu
-
+
qemu
-
+
+ qemu
+
+
+ qemu
+
+
qemu
diff --git a/qemu/Makefile b/qemu/Makefile
index 5c087980..9d7abf6c 100644
--- a/qemu/Makefile
+++ b/qemu/Makefile
@@ -50,8 +50,10 @@ GENERATED_FILES = config-host.h
GENERATED_FILES += qapi-builtin-types.h qapi-builtin-types.c
GENERATED_FILES += qapi-types.h qapi-types.c
GENERATED_FILES += qapi/qapi-types-common.h qapi/qapi-types-common.c
+GENERATED_FILES += qapi/qapi-types-misc.h qapi/qapi-types-misc.c
GENERATED_FILES += qapi-builtin-visit.h qapi-builtin-visit.c
GENERATED_FILES += qapi-visit.h qapi-visit.c
+GENERATED_FILES += qapi/qapi-visit-misc.h qapi/qapi-visit-misc.c
GENERATED_FILES += qapi/qapi-visit-common.h qapi/qapi-visit-common.c
# Don't try to regenerate Makefile or configure
@@ -153,14 +155,20 @@ $(SRC_PATH)/scripts/qapi/common.py \
$(SRC_PATH)/scripts/ordereddict.py \
$(SRC_PATH)/scripts/qapi-gen.py
-qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json
+qapi-modules = \
+$(SRC_PATH)/qapi-schema.json \
+$(SRC_PATH)/qapi/common.json \
+$(SRC_PATH)/qapi/misc.json
+
qapi-builtin-types.c qapi-builtin-types.h \
qapi-types.c qapi-types.h \
qapi/qapi-types-common.c qapi/qapi-types-common.h \
+qapi/qapi-types-misc.c qapi/qapi-types-misc.h \
qapi-builtin-visit.c qapi-builtin-visit.h \
qapi-visit.c qapi-visit.h \
qapi/qapi-visit-common.c qapi/qapi-visit-common.h \
+qapi/qapi-visit-misc.c qapi/qapi-visit-misc.h \
qapi-doc.texi: \
qapi-gen-timestamp ;
qapi-gen-timestamp: $(qapi-modules) $(qapi-py)
diff --git a/qemu/Makefile.objs b/qemu/Makefile.objs
index 61590446..917e9452 100644
--- a/qemu/Makefile.objs
+++ b/qemu/Makefile.objs
@@ -3,6 +3,8 @@
util-obj-y = util/ qobject/ qapi/ qapi-types.o qapi-visit.o
util-obj-y += qapi-builtin-types.o
util-obj-y += qapi-builtin-visit.o
+util-obj-y += qapi/qapi-types-misc.o
+util-obj-y += qapi/qapi-visit-misc.o
#######################################################################
# block-obj-y is code used by both qemu system emulation and qemu-img
diff --git a/qemu/qapi-schema.json b/qemu/qapi-schema.json
index 6e2a5c6c..71268a1e 100644
--- a/qemu/qapi-schema.json
+++ b/qemu/qapi-schema.json
@@ -74,46 +74,4 @@
# QAPI common definitions
{ 'include': 'qapi/common.json' }
-
-##
-# @X86CPURegister32:
-#
-# A X86 32-bit register
-#
-# Since: 1.5
-##
-{ 'enum': 'X86CPURegister32',
- 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
-
-##
-# @X86CPUFeatureWordInfo:
-#
-# Information about a X86 CPU feature word
-#
-# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
-#
-# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
-# feature word
-#
-# @cpuid-register: Output register containing the feature bits
-#
-# @features: value of output register, containing the feature bits
-#
-# Since: 1.5
-##
-{ 'struct': 'X86CPUFeatureWordInfo',
- 'data': { 'cpuid-input-eax': 'int',
- '*cpuid-input-ecx': 'int',
- 'cpuid-register': 'X86CPURegister32',
- 'features': 'int' } }
-
-##
-# @DummyForceArrays:
-#
-# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
-#
-# Since: 2.5
-##
-{ 'struct': 'DummyForceArrays',
- 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
-
+{ 'include': 'qapi/misc.json' }
diff --git a/qemu/qapi/misc.json b/qemu/qapi/misc.json
new file mode 100644
index 00000000..e9c06ce9
--- /dev/null
+++ b/qemu/qapi/misc.json
@@ -0,0 +1,44 @@
+# -*- Mode: Python -*-
+#
+
+##
+# @X86CPURegister32:
+#
+# A X86 32-bit register
+#
+# Since: 1.5
+##
+{ 'enum': 'X86CPURegister32',
+ 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
+
+##
+# @X86CPUFeatureWordInfo:
+#
+# Information about a X86 CPU feature word
+#
+# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
+#
+# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
+# feature word
+#
+# @cpuid-register: Output register containing the feature bits
+#
+# @features: value of output register, containing the feature bits
+#
+# Since: 1.5
+##
+{ 'struct': 'X86CPUFeatureWordInfo',
+ 'data': { 'cpuid-input-eax': 'int',
+ '*cpuid-input-ecx': 'int',
+ 'cpuid-register': 'X86CPURegister32',
+ 'features': 'int' } }
+
+##
+# @DummyForceArrays:
+#
+# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
+#
+# Since: 2.5
+##
+{ 'struct': 'DummyForceArrays',
+ 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }