aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch_init.c5
-rw-r--r--exec.c13
2 files changed, 6 insertions, 12 deletions
diff --git a/arch_init.c b/arch_init.c
index 2f082f30bb..47bb4b2d8f 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -369,8 +369,9 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
}
if (!block) {
- if (!qemu_ram_alloc(NULL, id, length))
- return -ENOMEM;
+ fprintf(stderr, "Unknown ramblock \"%s\", cannot "
+ "accept migration\n", id);
+ return -EINVAL;
}
total_ram_bytes -= length;
diff --git a/exec.c b/exec.c
index b9a14718b8..5420f564b5 100644
--- a/exec.c
+++ b/exec.c
@@ -2826,16 +2826,9 @@ ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size)
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (!strcmp(block->idstr, new_block->idstr)) {
- if (block->length == new_block->length) {
- fprintf(stderr, "RAMBlock \"%s\" exists, assuming lack of"
- "free.\n", new_block->idstr);
- qemu_free(new_block);
- return block->offset;
- } else {
- fprintf(stderr, "RAMBlock \"%s\" already registered with"
- "different size, abort\n", new_block->idstr);
- abort();
- }
+ fprintf(stderr, "RAMBlock \"%s\" already registered, abort!\n",
+ new_block->idstr);
+ abort();
}
}