]> git.proxmox.com Git - mirror_qemu.git/blobdiff - memory_mapping.c
memory-device: break the loop if tmp exceed the hinted range
[mirror_qemu.git] / memory_mapping.c
index 724dd0b417931e6d5d53f01f9f7a1af1b9a2c345..18d0b8067cb877e20e0187eae067194a65add16f 100644 (file)
@@ -14,7 +14,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 
-#include "qemu-common.h"
 #include "cpu.h"
 #include "sysemu/memory_mapping.h"
 #include "exec/memory.h"
@@ -223,7 +222,7 @@ static void guest_phys_blocks_region_add(MemoryListener *listener,
     if (!QTAILQ_EMPTY(&g->list->head)) {
         hwaddr predecessor_size;
 
-        predecessor = QTAILQ_LAST(&g->list->head, GuestPhysBlockHead);
+        predecessor = QTAILQ_LAST(&g->list->head);
         predecessor_size = predecessor->target_end - predecessor->target_start;
 
         /* the memory API guarantees monotonically increasing traversal */