9458a9a1df
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> |
||
---|---|---|
.. | ||
block-dirty-bitmap.c | ||
block.c | ||
block.h | ||
channel.c | ||
channel.h | ||
colo-failover.c | ||
colo.c | ||
exec.c | ||
exec.h | ||
fd.c | ||
fd.h | ||
global_state.c | ||
Makefile.objs | ||
migration.c | ||
migration.h | ||
page_cache.c | ||
page_cache.h | ||
postcopy-ram.c | ||
postcopy-ram.h | ||
qemu-file-channel.c | ||
qemu-file-channel.h | ||
qemu-file.c | ||
qemu-file.h | ||
qjson.c | ||
qjson.h | ||
ram.c | ||
ram.h | ||
rdma.c | ||
rdma.h | ||
savevm.c | ||
savevm.h | ||
socket.c | ||
socket.h | ||
tls.c | ||
tls.h | ||
trace-events | ||
vmstate-types.c | ||
vmstate.c | ||
xbzrle.c | ||
xbzrle.h |