From: Paolo Bonzini Date: Mon, 9 Mar 2015 14:28:37 +0000 (+0100) Subject: cpus: initialize cpu->memory_dispatch X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cba7054928b10a7fda57c64807451bbc9a31e42e;p=qemu.git cpus: initialize cpu->memory_dispatch This fixes a NULL pointer dereference in s390x-softmmu. On pretty much all other architectures, creating an MMIO region calls cpu_reload_memory_map. On s390, however, there are no MMIO regions and everything is done via hypercalls. Fixes: 9d82b5a792236db31a75b9db5c93af69ac07c7c5 Reported-by: Christian Borntraeger Signed-off-by: Paolo Bonzini --- diff --git a/exec.c b/exec.c index 6a5adab502..a6cb4a241c 100644 --- a/exec.c +++ b/exec.c @@ -548,6 +548,7 @@ void cpu_exec_init(CPUArchState *env) #ifndef CONFIG_USER_ONLY cpu->as = &address_space_memory; cpu->thread_id = qemu_get_thread_id(); + cpu_reload_memory_map(cpu); #endif QTAILQ_INSERT_TAIL(&cpus, cpu, node); #if defined(CONFIG_USER_ONLY)