[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 4/8] exec: add missing conditional compilation
From: |
Greg Kurz |
Subject: |
[Qemu-ppc] [PATCH 4/8] exec: add missing conditional compilation |
Date: |
Wed, 29 Jun 2016 22:50:57 +0200 |
User-agent: |
StGit/0.17.1-dirty |
Commit 741da0d38 "hw: cannot include hw/hw.h from user emulation" also
switched off compilation of the vmstate bits in cpu_exec_init() for user
mode.
This patch does the same in cpu_exec_exit() because user mode shouldn't
call vmstate_unregister() either.
Signed-off-by: Greg Kurz <address@hidden>
---
exec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/exec.c b/exec.c
index 0122ef76de5d..a528a1e6bbf6 100644
--- a/exec.c
+++ b/exec.c
@@ -654,17 +654,18 @@ void cpu_exec_exit(CPUState *cpu)
QTAILQ_REMOVE(&cpus, cpu, node);
cpu_release_index(cpu);
cpu->cpu_index = -1;
#if defined(CONFIG_USER_ONLY)
+ (void) cc;
cpu_list_unlock();
-#endif
-
+#else
if (cc->vmsd != NULL) {
vmstate_unregister(NULL, cc->vmsd, cpu);
}
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
vmstate_unregister(NULL, &vmstate_cpu_common, cpu);
}
+#endif
}
void cpu_exec_init(CPUState *cpu, Error **errp)
{
- [Qemu-ppc] [PATCH 0/8] ppc: compute cpu_dt_id in the machine code, Greg Kurz, 2016/06/29
- [Qemu-ppc] [PATCH 1/8] spapr: drop reference on child object during core realization, Greg Kurz, 2016/06/29
- [Qemu-ppc] [PATCH 2/8] spapr: do proper error propagation in spapr_cpu_core_realize_child(), Greg Kurz, 2016/06/29
- [Qemu-ppc] [PATCH 3/8] spapr: drop duplicate variable in spapr_core_release(), Greg Kurz, 2016/06/29
- [Qemu-ppc] [PATCH 4/8] exec: add missing conditional compilation,
Greg Kurz <=
- [Qemu-ppc] [PATCH 5/8] exec: move cpu_index init and exit to their own function, Greg Kurz, 2016/06/29
- [Qemu-ppc] [PATCH 6/8] ppc: move cpu index setup to instance_init/finalize, Greg Kurz, 2016/06/29
- [Qemu-ppc] [PATCH 7/8] cpu: add initialization helper without realize, Greg Kurz, 2016/06/29
- [Qemu-ppc] [PATCH 8/8] hw/ppc: move DT cpu id generation to machine code, Greg Kurz, 2016/06/29
- Re: [Qemu-ppc] [PATCH 0/8] ppc: compute cpu_dt_id in the machine code, Greg Kurz, 2016/06/29
- Re: [Qemu-ppc] [PATCH 0/8] ppc: compute cpu_dt_id in the machine code, David Gibson, 2016/06/30
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/8] ppc: compute cpu_dt_id in the machine code, Igor Mammedov, 2016/06/30