[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/18] exec: export qemu_get_ram_block()
From: |
Lei Li |
Subject: |
[Qemu-devel] [PATCH 09/18] exec: export qemu_get_ram_block() |
Date: |
Wed, 21 Aug 2013 15:18:46 +0800 |
Export qemu_get_ram_block() for localhost migration to
get the RAMBlock of given ram address.
Signed-off-by: Lei Li <address@hidden>
---
exec.c | 7 ++++++-
include/exec/cpu-common.h | 1 +
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/exec.c b/exec.c
index 3ca9381..45b054d 100644
--- a/exec.c
+++ b/exec.c
@@ -1303,7 +1303,12 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length)
}
#endif /* !_WIN32 */
-static RAMBlock *qemu_get_ram_block(ram_addr_t addr)
+/**
+ * Return the RAMBlock of the given ram offset
+ *
+ * abort if RAMBlock not found
+ **/
+RAMBlock *qemu_get_ram_block(ram_addr_t addr)
{
RAMBlock *block;
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index e4996e1..267fcec 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -54,6 +54,7 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length);
/* This should not be used by devices. */
MemoryRegion *qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr);
void qemu_ram_set_idstr(ram_addr_t addr, const char *name, DeviceState *dev);
+RAMBlock *qemu_get_ram_block(ram_addr_t addr);
void cpu_physical_memory_rw(hwaddr addr, uint8_t *buf,
int len, int is_write);
--
1.7.7.6
- Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook(), (continued)
[Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local(), Lei Li, 2013/08/21
[Qemu-devel] [PATCH 07/18] arch_init: export RAM_SAVE_xxx flags, Lei Li, 2013/08/21
[Qemu-devel] [PATCH 09/18] exec: export qemu_get_ram_block(),
Lei Li <=
[Qemu-devel] [PATCH 10/18] migration-local: implementation of outgoing part, Lei Li, 2013/08/21
[Qemu-devel] [PATCH 11/18] migration: introduce capability localhost, Lei Li, 2013/08/21