Message ID | 1359974470-17044-48-git-send-email-mjt@msgid.tls.msk.ru |
---|---|
State | New |
Headers | show |
diff --git a/kvm-all.c b/kvm-all.c index 9b73ccf..e92dc6f 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -347,7 +347,7 @@ static int kvm_get_dirty_pages_log_range(MemoryRegionSection *section, unsigned int i, j; unsigned long page_number, c; target_phys_addr_t addr, addr1; - unsigned int len = ((section->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS; + unsigned int len = ((section->size / getpagesize()) + HOST_LONG_BITS - 1) / HOST_LONG_BITS; unsigned long hpratio = getpagesize() / TARGET_PAGE_SIZE; /*