qemu-e2k/include
Haozhong Zhang 084140bd49 exec: fix access to ram_list.dirty_memory when sync dirty bitmap
In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd
argument 'start' is relative to the start of the ramblock 'rb'. When
it's used to access the dirty memory bitmap of ram_list (i.e.
ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->blocks[]), an offset to
the start of all RAM (i.e. rb->offset) should be added to it, which has
however been missed since c/s 6b6712efcc. For a ramblock of host memory
backend whose offset is not zero, cpu_physical_memory_sync_dirty_bitmap()
synchronizes the incorrect part of the dirty memory bitmap of ram_list
to the per ramblock dirty bitmap. As a result, a guest with host
memory backend may crash after migration.

Fix it by adding the offset of ramblock when accessing the dirty memory
bitmap of ram_list in cpu_physical_memory_sync_dirty_bitmap().

Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Message-Id: <20170628083704.24997-1-haozhong.zhang@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Tested-by: Juan Quintela <quintela@redhat.com>
Tested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-06-28 12:23:58 +02:00
..
block fix: avoid an infinite loop or a dangling pointer problem in img_commit 2017-06-26 14:54:46 +02:00
chardev char: fix alias devices regression 2017-06-08 17:57:36 +04:00
crypto
disas
exec exec: fix access to ram_list.dirty_memory when sync dirty bitmap 2017-06-28 12:23:58 +02:00
fpu
hw migration: move skip_section_footers 2017-06-28 11:18:39 +02:00
io
libdecnumber
migration vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
monitor
net
qapi qnum: add uint type 2017-06-20 14:31:31 +02:00
qemu ps2: add and use PS2State typedef 2017-06-23 11:51:50 +02:00
qom object: add uint property setter/getter 2017-06-20 14:31:32 +02:00
standard-headers linux-headers: update 2017-05-19 12:29:01 +02:00
sysemu migration: move only_migratable to MigrationState 2017-06-28 11:18:38 +02:00
ui gtk: use framebuffer helper functions. 2017-06-21 14:23:16 +02:00
elf.h
glib-compat.h
qemu-common.h utils: provide size_to_str() 2017-05-17 17:30:45 +01:00
qemu-io.h
trace-tcg.h