X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=memory.c;h=480f3d989b4f75014a3d0a9a0f1297e0b64adb32;hb=0050f9978e47182270c0536906abfd3e9fa91dea;hp=3071c4bdad8562cda7ebd926c22a03ed1dff0859;hpb=76c759e0335a4976e4c35c85a2a34ac6dab89034;p=mirror_qemu.git diff --git a/memory.c b/memory.c index 3071c4bdad..480f3d989b 100644 --- a/memory.c +++ b/memory.c @@ -15,7 +15,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qemu-common.h" #include "cpu.h" #include "exec/memory.h" #include "exec/address-spaces.h" @@ -30,6 +29,7 @@ #include "exec/ram_addr.h" #include "sysemu/kvm.h" #include "sysemu/sysemu.h" +#include "sysemu/tcg.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" @@ -2027,14 +2027,6 @@ void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client) memory_region_transaction_commit(); } -bool memory_region_get_dirty(MemoryRegion *mr, hwaddr addr, - hwaddr size, unsigned client) -{ - assert(mr->ram_block); - return cpu_physical_memory_get_dirty(memory_region_get_ram_addr(mr) + addr, - size, client); -} - void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size) { @@ -2731,6 +2723,13 @@ void memory_listener_unregister(MemoryListener *listener) listener->address_space = NULL; } +void address_space_remove_listeners(AddressSpace *as) +{ + while (!QTAILQ_EMPTY(&as->listeners)) { + memory_listener_unregister(QTAILQ_FIRST(&as->listeners)); + } +} + void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) { memory_region_ref(root);