From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org, qemu-devel@nongnu.org
Cc: avi@redhat.com
Subject: [patch uq/master 1/2] Allocate memory below 4GB as one chunk
Date: Wed, 24 Feb 2010 18:11:19 -0300 [thread overview]
Message-ID: <20100224211507.671656939@amt.cnet> (raw)
In-Reply-To: 20100224211117.958583246@amt.cnet
[-- Attachment #1: one-4gb-area.patch --]
[-- Type: text/plain, Size: 1299 bytes --]
From: Avi Kivity <avi@redhat.com>
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 <avi@redhat.com>
(cherry picked from commit cfe0cef63988a7876a9bbcb098500a3983e63814)
Index: qemu-kvm/hw/pc.c
===================================================================
--- qemu-kvm.orig/hw/pc.c
+++ qemu-kvm/hw/pc.c
@@ -798,18 +798,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) {
WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org, qemu-devel@nongnu.org
Cc: avi@redhat.com
Subject: [Qemu-devel] [patch uq/master 1/2] Allocate memory below 4GB as one chunk
Date: Wed, 24 Feb 2010 18:11:19 -0300 [thread overview]
Message-ID: <20100224211507.671656939@amt.cnet> (raw)
In-Reply-To: 20100224211117.958583246@amt.cnet
[-- Attachment #1: one-4gb-area.patch --]
[-- Type: text/plain, Size: 1297 bytes --]
From: Avi Kivity <avi@redhat.com>
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 <avi@redhat.com>
(cherry picked from commit cfe0cef63988a7876a9bbcb098500a3983e63814)
Index: qemu-kvm/hw/pc.c
===================================================================
--- qemu-kvm.orig/hw/pc.c
+++ qemu-kvm/hw/pc.c
@@ -798,18 +798,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) {
next prev parent reply other threads:[~2010-02-24 21:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 21:11 [patch uq/master 0/2] port qemu-kvm's -mem-path and -mem-prealloc to qemu Marcelo Tosatti
2010-02-24 21:11 ` [Qemu-devel] " Marcelo Tosatti
2010-02-24 21:11 ` Marcelo Tosatti [this message]
2010-02-24 21:11 ` [Qemu-devel] [patch uq/master 1/2] Allocate memory below 4GB as one chunk Marcelo Tosatti
2010-02-25 13:33 ` Avi Kivity
2010-02-25 13:33 ` [Qemu-devel] " Avi Kivity
2010-02-24 21:11 ` [patch uq/master 2/2] Add option to use file backed guest memory Marcelo Tosatti
2010-02-24 21:11 ` [Qemu-devel] " Marcelo Tosatti
2010-02-28 1:28 ` Paul Brook
2010-02-28 1:28 ` Paul Brook
2010-03-01 23:25 ` Marcelo Tosatti
2010-03-01 23:25 ` Marcelo Tosatti
2010-03-01 23:32 ` Marcelo Tosatti
2010-03-01 23:32 ` Marcelo Tosatti
2010-02-25 13:32 ` [patch uq/master 0/2] port qemu-kvm's -mem-path and -mem-prealloc to qemu Avi Kivity
2010-02-25 13:32 ` [Qemu-devel] " Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100224211507.671656939@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.