Convert ram_load() to the memory API

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity 2011-12-21 13:54:33 +02:00
parent f09f2189d5
commit dc94a7ed61
1 changed files with 2 additions and 2 deletions

View 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);