|
|
e84b90 |
From beb8650b34906da8f87e07238ab33aa8ffc54a67 Mon Sep 17 00:00:00 2001
|
|
|
e84b90 |
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
|
e84b90 |
Date: Thu, 18 Sep 2014 16:32:07 +0300
|
|
|
e84b90 |
Subject: [PATCH] pc: leave more space for BIOS allocations
|
|
|
e84b90 |
|
|
|
e84b90 |
Since QEMU 2.1, we are allocating more space for ACPI tables, so no
|
|
|
e84b90 |
space is left after initrd for the BIOS to allocate memory.
|
|
|
e84b90 |
|
|
|
e84b90 |
Besides ACPI tables, there are a few other uses of high memory in
|
|
|
e84b90 |
SeaBIOS: SMBIOS tables and USB drivers use it in particular. These uses
|
|
|
e84b90 |
allocate a very small amount of memory. Malloc metadata also lives
|
|
|
e84b90 |
there. So we need _some_ extra padding there to avoid initrd breakage,
|
|
|
e84b90 |
but not much.
|
|
|
e84b90 |
|
|
|
e84b90 |
John Snow found a case where RHEL5 was broken by the recent change to
|
|
|
e84b90 |
ACPI_TABLE_SIZE; in his case 4KB of extra padding are fine, but just to
|
|
|
e84b90 |
be safe I am adding 32KB, which is roughly the same amount of padding
|
|
|
e84b90 |
that was left by QEMU 2.0 and earlier.
|
|
|
e84b90 |
|
|
|
e84b90 |
Move initrd to leave some space for the BIOS.
|
|
|
e84b90 |
|
|
|
e84b90 |
Cc: qemu-stable@nongnu.org
|
|
|
e84b90 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
e84b90 |
Reported-by: John Snow <jsnow@redhat.com>
|
|
|
e84b90 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
e84b90 |
(cherry picked from commit 438f92ee9f6a4f78f8adcc399809e252b6da72a2)
|
|
|
e84b90 |
---
|
|
|
e84b90 |
hw/i386/pc.c | 6 ++++--
|
|
|
e84b90 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
e84b90 |
|
|
|
e84b90 |
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
|
|
e84b90 |
index 97932a6..ef9fad8 100644
|
|
|
e84b90 |
--- a/hw/i386/pc.c
|
|
|
e84b90 |
+++ b/hw/i386/pc.c
|
|
|
e84b90 |
@@ -72,8 +72,10 @@
|
|
|
e84b90 |
#define DPRINTF(fmt, ...)
|
|
|
e84b90 |
#endif
|
|
|
e84b90 |
|
|
|
e84b90 |
-/* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables. */
|
|
|
e84b90 |
-unsigned acpi_data_size = 0x20000;
|
|
|
e84b90 |
+/* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables
|
|
|
e84b90 |
+ * (128K) and other BIOS datastructures (less than 4K reported to be used at
|
|
|
e84b90 |
+ * the moment, 32K should be enough for a while). */
|
|
|
e84b90 |
+unsigned acpi_data_size = 0x20000 + 0x8000;
|
|
|
e84b90 |
void pc_set_legacy_acpi_data_size(void)
|
|
|
e84b90 |
{
|
|
|
e84b90 |
acpi_data_size = 0x10000;
|