From b2e0a138e77245290428a7d599a929e2e1bfe510 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 22 Nov 2010 19:52:34 +0200 Subject: migration: stable ram block ordering This makes ram block ordering under migration stable, ordered by offset. This is especially useful for migration to exec, for debugging. Signed-off-by: Michael S. Tsirkin Tested-by: Jason Wang --- cpu-common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpu-common.h') diff --git a/cpu-common.h b/cpu-common.h index a543b5d7cf..bb6b137e16 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -46,6 +46,9 @@ ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size); void qemu_ram_free(ram_addr_t addr); /* This should only be used for ram local to a device. */ void *qemu_get_ram_ptr(ram_addr_t addr); +/* Same but slower, to use for migration, where the order of + * RAMBlocks must not change. */ +void *qemu_safe_ram_ptr(ram_addr_t addr); /* This should not be used by devices. */ int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr); -- cgit v1.2.1