diff options
author | Andreas Färber <afaerber@suse.de> | 2012-12-23 00:39:34 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-12-23 00:40:49 +0100 |
commit | 501a7ce7270955be151c442c27620fa7af2f3ce5 (patch) | |
tree | 0374e4d581a0246074d55712b81baf01f3c439b6 /memory.c | |
parent | 62e0c095450f6a7eb37914991f3f7966aa4da7a1 (diff) | |
parent | 36f25d2537c40c6c47f4abee5d31a24863d1adf7 (diff) | |
download | qemu-501a7ce7270955be151c442c27620fa7af2f3ce5.tar.gz qemu-501a7ce7270955be151c442c27620fa7af2f3ce5.tar.bz2 qemu-501a7ce7270955be151c442c27620fa7af2f3ce5.zip |
Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu
Adapt header include paths.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'memory.c')
-rw-r--r-- | memory.c | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -13,14 +13,14 @@ * GNU GPL, version 2 or (at your option) any later version. */ -#include "memory.h" -#include "exec-memory.h" -#include "ioport.h" -#include "bitops.h" -#include "kvm.h" +#include "exec/memory.h" +#include "exec/address-spaces.h" +#include "exec/ioport.h" +#include "qemu/bitops.h" +#include "sysemu/kvm.h" #include <assert.h> -#include "memory-internal.h" +#include "exec/memory-internal.h" static unsigned memory_region_transaction_depth; static bool memory_region_update_pending; @@ -1081,6 +1081,22 @@ void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr, return cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size, -1); } +bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr, + hwaddr size, unsigned client) +{ + bool ret; + assert(mr->terminates); + ret = cpu_physical_memory_get_dirty(mr->ram_addr + addr, size, + 1 << client); + if (ret) { + cpu_physical_memory_reset_dirty(mr->ram_addr + addr, + mr->ram_addr + addr + size, + 1 << client); + } + return ret; +} + + void memory_region_sync_dirty_bitmap(MemoryRegion *mr) { AddressSpace *as; |