unicorn/qemu
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
..
crypto crypto: Clean up includes 2018-02-19 00:47:40 -05:00
default-configs
docs
fpu fpu: silence warnings 2018-02-22 09:52:28 -05:00
hw util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
include memory: RCU ram_list.dirty_memory[] for safe RAM hotplug 2018-02-22 15:38:03 -05:00
qapi include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
qobject util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
qom util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
scripts include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
target-arm target-arm: Make the 64-bit version of VTCR do the migration 2018-02-22 11:53:19 -05:00
target-i386 target-i386: implement PKE for TCG 2018-02-22 10:18:55 -05:00
target-m68k include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
target-mips target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs 2018-02-22 11:30:08 -05:00
target-sparc include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
tcg qemu-log: dfilter-ise exec, out_asm, op and opt_op 2018-02-22 10:06:19 -05:00
util util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
aarch64.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
aarch64eb.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
accel.c all: Clean up includes 2018-02-19 01:34:28 -05:00
arm.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
armeb.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
CODING_STYLE
configure config.status: Pass extra parameters 2018-02-22 10:12:54 -05:00
COPYING
COPYING.LIB
cpu-exec-common.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cpu-exec.c qemu-log: dfilter-ise exec, out_asm, op and opt_op 2018-02-22 10:06:19 -05:00
cpus.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cputlb.c cputlb: modernise the debug support 2018-02-22 10:10:45 -05:00
exec.c memory: RCU ram_list.dirty_memory[] for safe RAM hotplug 2018-02-22 15:38:03 -05:00
gen_all_header.sh
glib_compat.c glib_compat: backport hashtable iterator interfaces 2018-02-21 13:18:44 -05:00
HACKING
header_gen.py log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
ioport.c all: Clean up includes 2018-02-19 01:34:28 -05:00
LICENSE
m68k.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
Makefile qapi: Turn generators' mandatory option -i into an argument 2018-02-19 15:22:27 -05:00
Makefile.objs
Makefile.target
memory.c include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
memory_mapping.c include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
mips.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
mips64.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
mips64el.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
mipsel.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
powerpc.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
qapi-schema.json qapi: Lazy creation of array types 2018-02-19 18:55:35 -05:00
qemu-log.c log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
qemu-timer.c all: Clean up includes 2018-02-19 01:34:28 -05:00
rules.mak
softmmu_template.h
sparc.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
sparc64.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
tcg-runtime.c all: Clean up includes 2018-02-19 01:34:28 -05:00
translate-all.c qemu-log: dfilter-ise exec, out_asm, op and opt_op 2018-02-22 10:06:19 -05:00
translate-all.h
translate-common.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
unicorn_common.h qom/cpu: Add MemoryRegion property 2018-02-18 21:54:50 -05:00
VERSION
vl.c util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
vl.h
x86_64.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00