]> git.proxmox.com Git - qemu.git/blobdiff - memory.c
memory: fix subregion collision warning
[qemu.git] / memory.c
index 101b67c9351fadf75332677450cfd70bced3d6b8..ba74435a9b6a3dffc56e1e86bb636c92d2a4b62a 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -1190,16 +1190,19 @@ static void memory_region_add_subregion_common(MemoryRegion *mr,
         if (subregion->may_overlap || other->may_overlap) {
             continue;
         }
-        if (offset >= other->offset + other->size
-            || offset + subregion->size <= other->offset) {
+        if (offset >= other->addr + other->size
+            || offset + subregion->size <= other->addr) {
             continue;
         }
 #if 0
-        printf("warning: subregion collision %llx/%llx vs %llx/%llx\n",
+        printf("warning: subregion collision %llx/%llx (%s) "
+               "vs %llx/%llx (%s)\n",
                (unsigned long long)offset,
                (unsigned long long)subregion->size,
-               (unsigned long long)other->offset,
-               (unsigned long long)other->size);
+               subregion->name,
+               (unsigned long long)other->addr,
+               (unsigned long long)other->size,
+               other->name);
 #endif
     }
     QTAILQ_FOREACH(other, &mr->subregions, subregions_link) {