Alexander Graf wrote: > > On 27.07.2009, at 20:44, Jan Kiszka wrote: > >> Glauber Costa wrote: >>> If we try to sync bitmaps withouth KVM_MEM_LOG_DIRTY_PAGES being set >>> on a slot, we will enter an endless loop. Remove the test, since it >>> is not strictly needed anyway >>> >>> Signed-off-by: Glauber Costa >>> CC: Alexander Graf >>> --- >>> kvm-all.c | 5 ----- >>> 1 files changed, 0 insertions(+), 5 deletions(-) >>> >>> diff --git a/kvm-all.c b/kvm-all.c >>> index 824bb4c..d3bbd3c 100644 >>> --- a/kvm-all.c >>> +++ b/kvm-all.c >>> @@ -331,11 +331,6 @@ int >>> kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, >>> break; >>> } >>> >>> - /* We didn't activate dirty logging? Don't care then. */ >>> - if(!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) { >>> - continue; >>> - } >>> - >>> size = ((mem->memory_size >> TARGET_PAGE_BITS) + 7) / 8; >>> if (!d.dirty_bitmap) { >>> d.dirty_bitmap = qemu_malloc(size); >> >> Please let us revert the whole bd83677. > > Does the non-functional if (r < 0) hurt anyone? I would reduce the motivation of the next kvm-arch contributor to implement proper dirty log tracking. :) > > But if you like cleaniness, yes - reverting the whole thing would be > fine with me too. > There are no users for this in sight, so it's best the clean it up - and then fix the error check that this discussion has revealed. Jan