[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 16/16] ramblocks: No more being lazy about duplic
From: |
Alex Williamson |
Subject: |
[Qemu-devel] [PATCH v2 16/16] ramblocks: No more being lazy about duplicate names |
Date: |
Fri, 25 Jun 2010 11:10:26 -0600 |
User-agent: |
StGIT/0.14.3 |
Now that we have a working qemu_ram_free() and the primary runtime
user of it has been updated, don't be lenient about duplicate id strings.
We also shouldn't need to create them ondemand at the target.
Signed-off-by: Alex Williamson <address@hidden>
---
arch_init.c | 5 +++--
exec.c | 13 +++----------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 2f082f3..47bb4b2 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 e8108d7..ef2a89d 100644
--- a/exec.c
+++ b/exec.c
@@ -2813,16 +2813,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();
}
}
- [Qemu-devel] Re: [PATCH 12/15] savevm: Create a new continue flag to avoid resending block name, (continued)
- [Qemu-devel] [PATCH v2 00/16] Make migration work with hotplug, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 16/16] ramblocks: No more being lazy about duplicate names,
Alex Williamson <=
- [Qemu-devel] [PATCH v2 14/16] qemu_ram_free: Implement it, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 15/16] pci: Free the space allocated for the option rom on removal, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 13/16] savevm: Create a new continue flag to avoid resending block name, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 12/16] savevm: Use RAM blocks for basis of migration, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 10/16] ramblocks: Make use of DeviceState pointer and BusInfo.get_dev_path, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 11/16] savevm: Migrate RAM based on name/offset, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 07/16] eepro100: Add a dev field to eeprom new/free functions, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 08/16] virtio-net: Incorporate a DeviceState pointer and let savevm track instances, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 09/16] qemu_ram_alloc: Add DeviceState and name parameters, Alex Williamson, 2010/06/25
- [Qemu-devel] [PATCH v2 06/16] savevm: Make use of DeviceState, Alex Williamson, 2010/06/25