Message ID | 1350545426-23172-29-git-send-email-quintela@redhat.com |
---|---|
State | New |
Headers | show |
Il 18/10/2012 09:30, Juan Quintela ha scritto: > Signed-off-by: Juan Quintela <quintela@redhat.com> > --- > memory.c | 4 +++- > memory.h | 3 ++- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/memory.c b/memory.c > index 126fb63..4d0fa96 100644 > --- a/memory.c > +++ b/memory.c > @@ -1089,7 +1089,9 @@ bool memory_region_test_and_clear_dirty(MemoryRegion *mr, > ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, > 1 << client); > if (ret) { > - cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size, -1); > + cpu_physical_memory_reset_dirty(mr->ram_addr + addr, > + mr->ram_addr + addr + size, > + 1 << client); > } > return ret; > } > diff --git a/memory.h b/memory.h > index 08af012..0dcc0f4 100644 > --- a/memory.h > +++ b/memory.h > @@ -449,7 +449,8 @@ void memory_region_set_dirty(MemoryRegion *mr, target_phys_addr_t addr, > */ > bool memory_region_test_and_clear_dirty(MemoryRegion *mr, > target_phys_addr_t addr, > - target_phys_addr_t size, unsigned client) > + target_phys_addr_t size, > + unsigned client); > /** > * memory_region_sync_dirty_bitmap: Synchronize a region's dirty bitmap with > * any external TLBs (e.g. kvm) > This should be squashed in patch 26. Paolo
diff --git a/memory.c b/memory.c index 126fb63..4d0fa96 100644 --- a/memory.c +++ b/memory.c @@ -1089,7 +1089,9 @@ bool memory_region_test_and_clear_dirty(MemoryRegion *mr, ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, 1 << client); if (ret) { - cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size, -1); + cpu_physical_memory_reset_dirty(mr->ram_addr + addr, + mr->ram_addr + addr + size, + 1 << client); } return ret; } diff --git a/memory.h b/memory.h index 08af012..0dcc0f4 100644 --- a/memory.h +++ b/memory.h @@ -449,7 +449,8 @@ void memory_region_set_dirty(MemoryRegion *mr, target_phys_addr_t addr, */ bool memory_region_test_and_clear_dirty(MemoryRegion *mr, target_phys_addr_t addr, - target_phys_addr_t size, unsigned client) + target_phys_addr_t size, + unsigned client); /** * memory_region_sync_dirty_bitmap: Synchronize a region's dirty bitmap with * any external TLBs (e.g. kvm)
Signed-off-by: Juan Quintela <quintela@redhat.com> --- memory.c | 4 +++- memory.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)