mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
memory: call begin, log_start and commit when registering a new listener
This ensures that cpu_reload_memory_map() is called as soon as
tcg_cpu_address_space_init() is called, and before cpu->memory_dispatch
is used. qemu-system-s390x never changes the address spaces after
tcg_cpu_address_space_init() is called, and thus tcg_commit() is never
called. This causes a SIGSEGV.
Because memory_map_init() will now call mem_commit(), we have to
initialize io_mem_* before address_space_memory and friends.
Reported-by: Philipp Kern <pkern@debian.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Fixes: 0a1c71cec6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
69fbd0ea25
commit
680a4783dc
2 changed files with 10 additions and 1 deletions
2
exec.c
2
exec.c
|
@ -2694,8 +2694,8 @@ void cpu_register_map_client(QEMUBH *bh)
|
|||
void cpu_exec_init_all(void)
|
||||
{
|
||||
qemu_mutex_init(&ram_list.mutex);
|
||||
memory_map_init();
|
||||
io_mem_init();
|
||||
memory_map_init();
|
||||
qemu_mutex_init(&map_client_list_lock);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue