mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-24 22:25:11 +00: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. Backports commit 680a4783dc13f1059c03d11da58193d76c19ead6 from qemu
This commit is contained in:
parent
c2c3a800ad
commit
ad7663551b
|
@ -1561,10 +1561,10 @@ static void memory_map_init(struct uc_struct *uc)
|
||||||
|
|
||||||
void cpu_exec_init_all(struct uc_struct *uc)
|
void cpu_exec_init_all(struct uc_struct *uc)
|
||||||
{
|
{
|
||||||
|
io_mem_init(uc);
|
||||||
#if !defined(CONFIG_USER_ONLY)
|
#if !defined(CONFIG_USER_ONLY)
|
||||||
memory_map_init(uc);
|
memory_map_init(uc);
|
||||||
#endif
|
#endif
|
||||||
io_mem_init(uc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryRegion *get_system_memory(struct uc_struct *uc)
|
MemoryRegion *get_system_memory(struct uc_struct *uc)
|
||||||
|
|
Loading…
Reference in a new issue