aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-05-22 19:25:05 +0200
committerLaurent Vivier <laurent@vivier.eu>2020-06-05 21:23:22 +0200
commit3e07593aecccef9f5d877bb8a27a400d8431ea3b (patch)
tree7404db62674003f9465944ac3075f403b149b460
parent0c4e99317a7a95a80de17a83a6271c97e524f380 (diff)
downloadqemu-3e07593aecccef9f5d877bb8a27a400d8431ea3b.zip
qemu-3e07593aecccef9f5d877bb8a27a400d8431ea3b.tar.gz
qemu-3e07593aecccef9f5d877bb8a27a400d8431ea3b.tar.bz2
exec: Assert CPU migration is not used on user-only build
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Tested-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200522172510.25784-9-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 5162f0d..6dfd314 100644
--- a/exec.c
+++ b/exec.c
@@ -946,7 +946,9 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
qemu_plugin_vcpu_init_hook(cpu);
-#ifndef CONFIG_USER_ONLY
+#ifdef CONFIG_USER_ONLY
+ assert(cc->vmsd == NULL);
+#else /* !CONFIG_USER_ONLY */
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
vmstate_register(NULL, cpu->cpu_index, &vmstate_cpu_common, cpu);
}