On 17 December 2013 15:26, Juan Quintela <quint...@redhat.com> wrote: > @@ -399,8 +401,9 @@ static int > kvm_get_dirty_pages_log_range(MemoryRegionSection *section, > page_number = (i * HOST_LONG_BITS + j) * hpratio; > addr1 = page_number * TARGET_PAGE_SIZE; > addr = section->offset_within_region + addr1; > - memory_region_set_dirty(section->mr, addr, > - TARGET_PAGE_SIZE * hpratio); > + ram_addr = section->mr->ram_addr + addr;
struct MemoryRegion says: /* All fields are private - violators will be prosecuted */ so fishing around in it for mr->ram_addr seems like a bad idea. Perhaps we could make memory_region_set_dirty() an inline function in memory.h instead? thanks -- PMM