diff options
| author | Anthony Liguori <aliguori@amazon.com> | 2014-01-13 13:20:49 -0800 |
|---|---|---|
| committer | Anthony Liguori <aliguori@amazon.com> | 2014-01-13 13:20:49 -0800 |
| commit | b54f18ba3415c731f0b069f6df56f529997fb74e (patch) | |
| tree | eeb668ba9612f9734594b0b64c8c9ad7ca291371 /memory.c | |
| parent | dd089c0a1e928fb80ba8a37983c1b0e9232d1c8b (diff) | |
| parent | aa8dc044772ba156cbcf2174b5673cfa11f566a7 (diff) | |
| download | focaccia-qemu-b54f18ba3415c731f0b069f6df56f529997fb74e.tar.gz focaccia-qemu-b54f18ba3415c731f0b069f6df56f529997fb74e.zip | |
Merge remote-tracking branch 'quintela/tags/migration/20140113' into staging
migration.next for 20140113 # gpg: Signature made Mon 13 Jan 2014 09:38:27 AM PST using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * quintela/tags/migration/20140113: (49 commits) migration: synchronize memory bitmap 64bits at a time ram: split function that synchronizes a range memory: syncronize kvm bitmap using bitmaps operations memory: move bitmap synchronization to its own function kvm: refactor start address calculation kvm: use directly cpu_physical_memory_* api for tracking dirty pages memory: unfold memory_region_test_and_clear() memory: split cpu_physical_memory_* functions to its own include memory: cpu_physical_memory_set_dirty_tracking() should return void memory: make cpu_physical_memory_reset_dirty() take a length parameter memory: s/dirty/clean/ in cpu_physical_memory_is_dirty() memory: cpu_physical_memory_clear_dirty_range() now uses bitmap operations memory: cpu_physical_memory_set_dirty_range() now uses bitmap operations memory: use find_next_bit() to find dirty bits memory: s/mask/clear/ cpu_physical_memory_mask_dirty_range memory: cpu_physical_memory_get_dirty() is used as returning a bool memory: make cpu_physical_memory_get_dirty() the main function memory: unfold cpu_physical_memory_set_dirty_flag() memory: unfold cpu_physical_memory_set_dirty() in its only user memory: unfold cpu_physical_memory_clear_dirty_flag() in its only user ... Message-id: 1389634834-24181-1-git-send-email-quintela@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'memory.c')
| -rw-r--r-- | memory.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/memory.c b/memory.c index 776431416f..59ecc28401 100644 --- a/memory.c +++ b/memory.c @@ -22,6 +22,7 @@ #include <assert.h> #include "exec/memory-internal.h" +#include "exec/ram_addr.h" //#define DEBUG_UNASSIGNED @@ -1174,15 +1175,14 @@ bool memory_region_get_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size, unsigned client) { assert(mr->terminates); - return cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, - 1 << client); + return cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, client); } void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size) { assert(mr->terminates); - return cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size, -1); + cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size); } bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr, @@ -1190,12 +1190,9 @@ bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr, { bool ret; assert(mr->terminates); - ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, - 1 << client); + ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, client); if (ret) { - cpu_physical_memory_reset_dirty(mr->ram_addr + addr, - mr->ram_addr + addr + size, - 1 << client); + cpu_physical_memory_reset_dirty(mr->ram_addr + addr, size, client); } return ret; } @@ -1241,9 +1238,7 @@ void memory_region_reset_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size, unsigned client) { assert(mr->terminates); - cpu_physical_memory_reset_dirty(mr->ram_addr + addr, - mr->ram_addr + addr + size, - 1 << client); + cpu_physical_memory_reset_dirty(mr->ram_addr + addr, size, client); } void *memory_region_get_ram_ptr(MemoryRegion *mr) |