diff options
author | Anthony Liguori <anthony@codemonkey.ws> | 2013-09-11 14:45:57 -0500 |
---|---|---|
committer | Anthony Liguori <anthony@codemonkey.ws> | 2013-09-11 14:45:57 -0500 |
commit | 97fdb9410bb5398fd33f51a37e637d697ace9f73 (patch) | |
tree | 4ef6c9bacf43f9da6aadd5168220a7203dd29b35 /xen-all.c | |
parent | 964737ea195de1560f3bcf55b8b6d4f7d0d4a619 (diff) | |
parent | 254c12825f93f405658ca3366cd34f8a8ad23511 (diff) | |
download | qemu-97fdb9410bb5398fd33f51a37e637d697ace9f73.zip qemu-97fdb9410bb5398fd33f51a37e637d697ace9f73.tar.gz qemu-97fdb9410bb5398fd33f51a37e637d697ace9f73.tar.bz2 |
Merge remote-tracking branch 'sstabellini/xen-2013-09-09' into staging
# By Anthony PERARD
# Via Stefano Stabellini
* sstabellini/xen-2013-09-09:
pc_q35: Initialize Xen.
pc: Initializing ram_memory under Xen.
Message-id: alpine.DEB.2.02.1309091718030.6397@kaball.uk.xensource.com
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Diffstat (limited to 'xen-all.c')
-rw-r--r-- | xen-all.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -154,7 +154,7 @@ qemu_irq *xen_interrupt_controller_init(void) /* Memory Ops */ -static void xen_ram_init(ram_addr_t ram_size) +static void xen_ram_init(ram_addr_t ram_size, MemoryRegion **ram_memory_p) { MemoryRegion *sysmem = get_system_memory(); ram_addr_t below_4g_mem_size, above_4g_mem_size = 0; @@ -168,6 +168,7 @@ static void xen_ram_init(ram_addr_t ram_size) block_len += HVM_BELOW_4G_MMIO_LENGTH; } memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len); + *ram_memory_p = &ram_memory; vmstate_register_ram_global(&ram_memory); if (ram_size >= HVM_BELOW_4G_RAM_END) { @@ -1059,7 +1060,7 @@ static void xen_read_physmap(XenIOState *state) free(entries); } -int xen_hvm_init(void) +int xen_hvm_init(MemoryRegion **ram_memory) { int i, rc; unsigned long ioreq_pfn; @@ -1134,7 +1135,7 @@ int xen_hvm_init(void) /* Init RAM management */ xen_map_cache_init(xen_phys_offset_to_gaddr, state); - xen_ram_init(ram_size); + xen_ram_init(ram_size, ram_memory); qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state); |