Re: [Qemu-devel] race between tb_gen_code() and qemu_ram_free()

2018-04-23 Thread Peter Maydell
On 20 April 2018 at 19:20, Paolo Bonzini wrote: > Note that qemu_ram_free() is _also_ RCU-freeing the RAMBlock. If it is > not found, it means that codegen is not running within > rcu_read_lock()/rcu_read_unlock(). In fact it's not. This seems to not be the only problem. We get into difficultie

Re: [Qemu-devel] race between tb_gen_code() and qemu_ram_free()

2018-04-20 Thread Paolo Bonzini
On 20/04/2018 19:55, Peter Maydell wrote: > There seems to be a race between tb_gen_code() and qemu_ram_free(), > which results in an abort() in Edgar's test case that exercises the > xilinx-spips mmio-exec functionality. > > Here's what happens: > (1) memory_region_invalidate_mmio_ptr() is calle

[Qemu-devel] race between tb_gen_code() and qemu_ram_free()

2018-04-20 Thread Peter Maydell
There seems to be a race between tb_gen_code() and qemu_ram_free(), which results in an abort() in Edgar's test case that exercises the xilinx-spips mmio-exec functionality. Here's what happens: (1) memory_region_invalidate_mmio_ptr() is called, and it deletes the temporary ram MemoryRegion. Thi