mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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: 9d82b5a792
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
21b7cf9e07
commit
cba7054928
1 changed files with 1 additions and 0 deletions
1
exec.c
1
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue