From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH] keep initrd in below 4g area.
Date: Mon, 18 May 2009 16:35:58 -0400 [thread overview]
Message-ID: <1242678958-30061-1-git-send-email-glommer@redhat.com> (raw)
initrd must be kept on the memory area below 4g. By not doing this,
we're seeing guests break while using -initrd and values of -mem
superior to 4096.
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
hw/pc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 094f01a..92c7ac5 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -597,7 +597,8 @@ static long get_file_size(FILE *f)
static void load_linux(target_phys_addr_t option_rom,
const char *kernel_filename,
const char *initrd_filename,
- const char *kernel_cmdline)
+ const char *kernel_cmdline,
+ target_phys_addr_t max_ram_size)
{
uint16_t protocol;
uint32_t gpr[8];
@@ -663,8 +664,8 @@ static void load_linux(target_phys_addr_t option_rom,
else
initrd_max = 0x37ffffff;
- if (initrd_max >= ram_size-ACPI_DATA_SIZE)
- initrd_max = ram_size-ACPI_DATA_SIZE-1;
+ if (initrd_max >= max_ram_size-ACPI_DATA_SIZE)
+ initrd_max = max_ram_size-ACPI_DATA_SIZE-1;
/* kernel command line */
pstrcpy_targphys(cmdline_addr, 4096, kernel_cmdline);
@@ -951,7 +952,7 @@ static void pc_init1(ram_addr_t ram_size,
if (linux_boot) {
load_linux(0xc0000 + oprom_area_size,
- kernel_filename, initrd_filename, kernel_cmdline);
+ kernel_filename, initrd_filename, kernel_cmdline, below_4g_mem_size);
oprom_area_size += 2048;
}
--
1.5.6.6
reply other threads:[~2009-05-18 20:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1242678958-30061-1-git-send-email-glommer@redhat.com \
--to=glommer@redhat.com \
--cc=aliguori@us.ibm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).