aboutsummaryrefslogtreecommitdiff
path: root/softmmu/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu/vl.c')
-rw-r--r--softmmu/vl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index d7f0b029dc..aadb526138 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -29,6 +29,7 @@
#include "exec/cpu-common.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
+#include "qapi/compat-policy.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qjson.h"
@@ -114,6 +115,7 @@
#include "sysemu/replay.h"
#include "qapi/qapi-events-run-state.h"
#include "qapi/qapi-visit-block-core.h"
+#include "qapi/qapi-visit-compat.h"
#include "qapi/qapi-visit-ui.h"
#include "qapi/qapi-commands-block-core.h"
#include "qapi/qapi-commands-migration.h"
@@ -3452,6 +3454,21 @@ void qemu_init(int argc, char **argv, char **envp)
enable_mlock = qemu_opt_get_bool(opts, "mem-lock", false);
enable_cpu_pm = qemu_opt_get_bool(opts, "cpu-pm", false);
break;
+ case QEMU_OPTION_compat:
+ {
+ CompatPolicy *opts;
+ Visitor *v;
+
+ v = qobject_input_visitor_new_str(optarg, NULL,
+ &error_fatal);
+
+ visit_type_CompatPolicy(v, NULL, &opts, &error_fatal);
+ QAPI_CLONE_MEMBERS(CompatPolicy, &compat_policy, opts);
+
+ qapi_free_CompatPolicy(opts);
+ visit_free(v);
+ break;
+ }
case QEMU_OPTION_msg:
opts = qemu_opts_parse_noisily(qemu_find_opts("msg"), optarg,
false);