From 309cb471c80e5909710d1ee3c3b50d481496d189 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 8 Aug 2011 16:09:03 +0300 Subject: Integrate I/O memory regions into qemu get_system_io() returns the root I/O memory region. Reviewed-by: Richard Henderson Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori --- exec.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'exec.c') diff --git a/exec.c b/exec.c index 719fff9a9..be7e4b245 100644 --- a/exec.c +++ b/exec.c @@ -113,6 +113,7 @@ static int in_migration; RAMList ram_list = { .blocks = QLIST_HEAD_INITIALIZER(ram_list) }; static MemoryRegion *system_memory; +static MemoryRegion *system_io; #endif @@ -3830,6 +3831,10 @@ static void memory_map_init(void) system_memory = qemu_malloc(sizeof(*system_memory)); memory_region_init(system_memory, "system", INT64_MAX); set_system_memory_map(system_memory); + + system_io = qemu_malloc(sizeof(*system_io)); + memory_region_init(system_io, "io", 65536); + set_system_io_map(system_io); } MemoryRegion *get_system_memory(void) @@ -3837,6 +3842,11 @@ MemoryRegion *get_system_memory(void) return system_memory; } +MemoryRegion *get_system_io(void) +{ + return system_io; +} + #endif /* !defined(CONFIG_USER_ONLY) */ /* physical memory access (slow version, mainly for debug) */ -- cgit v1.2.3