]> git.proxmox.com Git - qemu.git/commitdiff
Convert ram_load() to the memory API
authorAvi Kivity <avi@redhat.com>
Wed, 21 Dec 2011 11:54:33 +0000 (13:54 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 4 Jan 2012 11:34:48 +0000 (13:34 +0200)
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch_init.c

index bb2f263d931ecef1efd8b5ca5ddc50a0cf767db7..de1886ba26e4c69357f47fd5c3b54e7692e8d90d 100644 (file)
@@ -344,7 +344,7 @@ static inline void *host_from_stream_offset(QEMUFile *f,
             return NULL;
         }
 
-        return block->host + offset;
+        return memory_region_get_ram_ptr(block->mr) + offset;
     }
 
     len = qemu_get_byte(f);
@@ -353,7 +353,7 @@ static inline void *host_from_stream_offset(QEMUFile *f,
 
     QLIST_FOREACH(block, &ram_list.blocks, next) {
         if (!strncmp(id, block->idstr, sizeof(id)))
-            return block->host + offset;
+            return memory_region_get_ram_ptr(block->mr) + offset;
     }
 
     fprintf(stderr, "Can't find block %s!\n", id);