[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/6] Allocate memory below 4GB as one chunk
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 1/6] Allocate memory below 4GB as one chunk |
Date: |
Thu, 4 Mar 2010 12:05:11 -0300 |
From: Avi Kivity <address@hidden>
Instead of allocating a separate chunk for the first 640KB and another
for 1MB+, allocate one large chunk. This plays well in terms of alignment
and size with large pages.
Signed-off-by: Avi Kivity <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
---
hw/pc.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 4f6a522..bdc297f 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -833,18 +833,11 @@ static void pc_init1(ram_addr_t ram_size,
vmport_init();
/* allocate RAM */
- ram_addr = qemu_ram_alloc(0xa0000);
+ ram_addr = qemu_ram_alloc(below_4g_mem_size);
cpu_register_physical_memory(0, 0xa0000, ram_addr);
-
- /* Allocate, even though we won't register, so we don't break the
- * phys_ram_base + PA assumption. This range includes vga (0xa0000 -
0xc0000),
- * and some bios areas, which will be registered later
- */
- ram_addr = qemu_ram_alloc(0x100000 - 0xa0000);
- ram_addr = qemu_ram_alloc(below_4g_mem_size - 0x100000);
cpu_register_physical_memory(0x100000,
below_4g_mem_size - 0x100000,
- ram_addr);
+ ram_addr + 0x100000);
/* above 4giga memory allocation */
if (above_4g_mem_size > 0) {
--
1.6.6.1
- [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 1/6] Allocate memory below 4GB as one chunk,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 2/6] Add option to use file backed guest memory, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 4/6] KVM: Rework VCPU state writeback API, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 6/6] x86: Extend validity of bsp_to_cpu, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 5/6] KVM: x86: Restrict writeback of VCPU state, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 3/6] KVM: Rework of guest debug state writing, Marcelo Tosatti, 2010/03/04
- Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/03/04