]> git.proxmox.com Git - mirror_qemu.git/commit - memory.c
memory: prepare for multiple bits in the dirty log mask
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 25 Apr 2015 12:38:30 +0000 (14:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Jun 2015 15:09:59 +0000 (17:09 +0200)
commitb2dfd71c4843a762f2befe702adb249cf55baf66
tree0abf5034bdbb2f6595442684020f5d030a844463
parent2d1a35bef0ed96b3f23535e459c552414ccdbafd
memory: prepare for multiple bits in the dirty log mask

When the dirty log mask will also cover other bits than DIRTY_MEMORY_VGA,
some listeners may be interested in the overall zero/non-zero value of
the dirty log mask; others may be interested in the value of single bits.

For this reason, always call log_start/log_stop if bits have respectively
appeared or disappeared, and pass the old and new values of the dirty log
mask so that listeners can distinguish the kinds of change.

For example, KVM checks if dirty logging used to be completely disabled
(in log_start) or is now completely disabled (in log_stop).  On the
other hand, Xen has to check manually if DIRTY_MEMORY_VGA changed,
since that is the only bit it cares about.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/virtio/vhost.c
include/exec/memory.h
kvm-all.c
memory.c
xen-hvm.c