|
|
d81766 |
From 529f533c61f49bdbdb72faf836cf94b717555c45 Mon Sep 17 00:00:00 2001
|
|
|
d81766 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
d81766 |
Date: Mon, 7 Jul 2014 10:28:38 +0200
|
|
|
d81766 |
Subject: vl: Round memory sizes below 2MiB up to 2MiB
|
|
|
d81766 |
|
|
|
d81766 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
d81766 |
Message-id: <1387459965-19517-2-git-send-email-armbru@redhat.com>
|
|
|
d81766 |
Patchwork-id: 56389
|
|
|
d81766 |
O-Subject: [PATCH 7.0 qemu-kvm 1/1] vl: Round memory sizes below 2MiB up to 2MiB
|
|
|
d81766 |
Bugzilla: 999836
|
|
|
d81766 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
d81766 |
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
d81766 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
d81766 |
|
|
|
d81766 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
d81766 |
|
|
|
d81766 |
SeaBIOS requires at least 1MiB of RAM, but doesn't doesn't check for
|
|
|
d81766 |
it. It simply assumes it's there, and crashes when it isn't, often
|
|
|
d81766 |
without any indication what's wrong. No upstream SeaBIOS fix
|
|
|
d81766 |
expected.
|
|
|
d81766 |
|
|
|
d81766 |
In RHEL-6, we round memory sizes below 2MiB up to 2MiB to protect
|
|
|
d81766 |
SeaBIOS (commit 551c098 and commit b9d6c40). Do the same for RHEL-7.
|
|
|
d81766 |
Not wanted upstream.
|
|
|
d81766 |
|
|
|
d81766 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
d81766 |
|
|
|
d81766 |
diff --git a/vl.c b/vl.c
|
|
|
d81766 |
index ab69cdc..d225b8f 100644
|
|
|
d81766 |
--- a/vl.c
|
|
|
d81766 |
+++ b/vl.c
|
|
|
d81766 |
@@ -3330,6 +3330,7 @@ int main(int argc, char **argv, char **envp)
|
|
|
d81766 |
}
|
|
|
d81766 |
|
|
|
d81766 |
sz = QEMU_ALIGN_UP(sz, 8192);
|
|
|
d81766 |
+ sz = MAX(sz, 2 * 1024 * 1024);
|
|
|
d81766 |
ram_size = sz;
|
|
|
d81766 |
if (ram_size != sz) {
|
|
|
d81766 |
error_report("ram size too large");
|