|
|
357786 |
From dd20dff28940349e9fdca87583c8878607ef3734 Mon Sep 17 00:00:00 2001
|
|
|
9bac43 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
9bac43 |
Date: Mon, 7 Jul 2014 10:28:38 +0200
|
|
|
9bac43 |
Subject: vl: Round memory sizes below 2MiB up to 2MiB
|
|
|
9bac43 |
|
|
|
9bac43 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
9bac43 |
Message-id: <1387459965-19517-2-git-send-email-armbru@redhat.com>
|
|
|
9bac43 |
Patchwork-id: 56389
|
|
|
9bac43 |
O-Subject: [PATCH 7.0 qemu-kvm 1/1] vl: Round memory sizes below 2MiB up to 2MiB
|
|
|
9bac43 |
Bugzilla: 999836
|
|
|
9bac43 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
9bac43 |
|
|
|
9bac43 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
9bac43 |
|
|
|
9bac43 |
SeaBIOS requires at least 1MiB of RAM, but doesn't doesn't check for
|
|
|
9bac43 |
it. It simply assumes it's there, and crashes when it isn't, often
|
|
|
9bac43 |
without any indication what's wrong. No upstream SeaBIOS fix
|
|
|
9bac43 |
expected.
|
|
|
9bac43 |
|
|
|
9bac43 |
In RHEL-6, we round memory sizes below 2MiB up to 2MiB to protect
|
|
|
9bac43 |
SeaBIOS (commit 551c098 and commit b9d6c40). Do the same for RHEL-7.
|
|
|
9bac43 |
Not wanted upstream.
|
|
|
9bac43 |
|
|
|
9bac43 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9bac43 |
(cherry picked from commit 5c401c750c8e52fe5c67b4e60143a862a0d584c1)
|
|
|
357786 |
(cherry picked from commit 29e44e4e1f10ac7d2f9ac824b928518f3a2ccc10)
|
|
|
357786 |
(cherry picked from commit 07a664c4bc80f9db8fa027a654214e7f09ee81e0)
|
|
|
357786 |
(cherry picked from commit be20ffb392aae07927923f8377bc59fb6a5707aa)
|
|
|
357786 |
(cherry picked from commit 91707a42f802c7bd20f37959849c127d94c71f75)
|
|
|
9bac43 |
---
|
|
|
9bac43 |
vl.c | 1 +
|
|
|
9bac43 |
1 file changed, 1 insertion(+)
|
|
|
9bac43 |
|
|
|
9bac43 |
diff --git a/vl.c b/vl.c
|
|
|
357786 |
index 7fce42d..cbd6bcc 100644
|
|
|
9bac43 |
--- a/vl.c
|
|
|
9bac43 |
+++ b/vl.c
|
|
|
357786 |
@@ -2932,6 +2932,7 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size,
|
|
|
9bac43 |
}
|
|
|
9bac43 |
|
|
|
9bac43 |
sz = QEMU_ALIGN_UP(sz, 8192);
|
|
|
9bac43 |
+ sz = MAX(sz, 2 * 1024 * 1024);
|
|
|
9bac43 |
ram_size = sz;
|
|
|
9bac43 |
if (ram_size != sz) {
|
|
|
9bac43 |
error_report("ram size too large");
|
|
|
9bac43 |
--
|
|
|
9bac43 |
1.8.3.1
|
|
|
9bac43 |
|