qemu-e2k/migration
Paolo Bonzini 9458a9a1df memory: fix race between TCG and accesses to dirty bitmap
There is a race between TCG and accesses to the dirty log:

      vCPU thread                  reader thread
      -----------------------      -----------------------
      TLB check -> slow path
        notdirty_mem_write
          write to RAM
          set dirty flag
                                   clear dirty flag
      TLB check -> fast path
                                   read memory
        write to RAM

Fortunately, in order to fix it, no change is required to the
vCPU thread.  However, the reader thread must delay the read after
the vCPU thread has finished the write.  This can be approximated
conservatively by run_on_cpu, which waits for the end of the current
translation block.

A similar technique is used by KVM, which has to do a synchronous TLB
flush after doing a test-and-clear of the dirty-page flags.

Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-08-20 17:26:20 +02:00
..
block-dirty-bitmap.c qapi: implement block-dirty-bitmap-remove transaction action 2019-08-16 16:28:03 -04:00
block.c block/dirty-bitmap: add bdrv_dirty_bitmap_get 2019-08-16 16:28:02 -04:00
block.h
channel.c migration: fix the multifd code when receiving less channels 2019-01-23 15:02:07 +00:00
channel.h
colo-failover.c migration/colo.c: Remove redundant input parameter 2019-05-14 17:33:35 +01:00
colo.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
exec.c
exec.h
fd.c migration: Fix fd protocol for incoming defer 2019-06-05 12:43:55 +02:00
fd.h migration: Fix fd protocol for incoming defer 2019-06-05 12:43:55 +02:00
global_state.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
Makefile.objs
migration.c Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
migration.h Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
page_cache.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
page_cache.h
postcopy-ram.c Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
postcopy-ram.h migration/postcopy: make PostcopyDiscardState a static variable 2019-08-14 17:33:14 +01:00
qemu-file-channel.c Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
qemu-file-channel.h
qemu-file.c migration: add qemu_file_update_transfer interface 2019-08-14 17:33:14 +01:00
qemu-file.h Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
qjson.c
qjson.h
ram.c memory: fix race between TCG and accesses to dirty bitmap 2019-08-20 17:26:20 +02:00
ram.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
rdma.c Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
rdma.h
savevm.c Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
savevm.h savevm: split the process of different stages for loadvm/savevm 2018-10-19 11:15:03 +08:00
socket.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
socket.h
tls.c migration: add support for a "tls-authz" migration parameter 2019-03-25 18:13:47 +01:00
tls.h
trace-events migration: add some multifd traces 2019-08-14 17:33:14 +01:00
vmstate-types.c Clean up inclusion of exec/cpu-common.h 2019-08-16 13:31:52 +02:00
vmstate.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
xbzrle.c
xbzrle.h