unicorn/qemu/include/exec
Stefan Hajnoczi e79e0881cd
memory: RCU ram_list.dirty_memory[] for safe RAM hotplug
Although accesses to ram_list.dirty_memory[] use atomics so multiple
threads can safely dirty the bitmap, the data structure is not fully
thread-safe yet.

This patch handles the RAM hotplug case where ram_list.dirty_memory[] is
grown.  ram_list.dirty_memory[] is change from a regular bitmap to an
RCU array of pointers to fixed-size bitmap blocks.  Threads can continue
accessing bitmap blocks while the array is being extended.  See the
comments in the code for an in-depth explanation of struct
DirtyMemoryBlocks.

I have tested that live migration with virtio-blk dataplane works.

Backports commit 5b82b703b69acc67b78b98a5efc897a3912719eb from qemu
2018-02-22 15:38:03 -05:00
..
address-spaces.h import 2015-08-21 15:04:50 +08:00
cpu-all.h cpu-all: complete real host page size API 2018-02-17 15:23:16 -05:00
cpu-common.h qemu_ram_foreach_block: pass up error value, and down the ramblock name 2018-02-18 19:17:18 -05:00
cpu-defs.h cpu_defs: Simplify CPUTLB padding logic 2018-02-17 15:23:27 -05:00
cpu_ldst.h softmmu: remove now unused functions 2018-02-17 15:23:38 -05:00
cpu_ldst_template.h softmmu: add helper function to pass through retaddr 2018-02-17 15:23:38 -05:00
cputlb.h cputlb.c: Use correct address space when looking up MemoryRegionSection 2018-02-17 23:15:22 -05:00
exec-all.h qemu-log: dfilter-ise exec, out_asm, op and opt_op 2018-02-22 10:06:19 -05:00
gen-icount.h tcg: Change translator-side labels to a pointer 2018-02-09 14:17:56 -05:00
helper-gen.h import 2015-08-21 15:04:50 +08:00
helper-head.h import 2015-08-21 15:04:50 +08:00
helper-proto.h import 2015-08-21 15:04:50 +08:00
helper-tcg.h This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
hwaddr.h platform.h move #3 2017-01-21 00:13:21 +11:00
ioport.h import 2015-08-21 15:04:50 +08:00
memattrs.h target-i386: introduce cpu_get_mem_attrs 2018-02-13 11:33:39 -05:00
memory-internal.h import 2015-08-21 15:04:50 +08:00
memory.h Merge memory_region_init_reservation() into memory_region_init_io() 2018-02-21 11:23:00 -05:00
ram_addr.h memory: RCU ram_list.dirty_memory[] for safe RAM hotplug 2018-02-22 15:38:03 -05:00
ramlist.h memory: RCU ram_list.dirty_memory[] for safe RAM hotplug 2018-02-22 15:38:03 -05:00
semihost.h exec: Add semihosting stubs 2018-02-17 15:23:33 -05:00
tb-hash.h cpu-defs: Move out TB_JMP defines 2018-02-17 15:23:15 -05:00