From 2b35241a510c17f731ba0142aa071d7ae24bf55b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 19 Dec 2013 13:32:45 +0100 Subject: [PATCH 03/16] vl: Round memory sizes below 2MiB up to 2MiB RH-Author: Markus Armbruster Message-id: <1387459965-19517-2-git-send-email-armbru@redhat.com> Patchwork-id: 56389 O-Subject: [PATCH 7.0 qemu-kvm 1/1] vl: Round memory sizes below 2MiB up to 2MiB Bugzilla: 999836 RH-Acked-by: Laszlo Ersek RH-Acked-by: Luiz Capitulino RH-Acked-by: Igor Mammedov From: Markus Armbruster SeaBIOS requires at least 1MiB of RAM, but doesn't doesn't check for it. It simply assumes it's there, and crashes when it isn't, often without any indication what's wrong. No upstream SeaBIOS fix expected. In RHEL-6, we round memory sizes below 2MiB up to 2MiB to protect SeaBIOS (commit 551c098 and commit b9d6c40). Do the same for RHEL-7. Not wanted upstream. Signed-off-by: Markus Armbruster --- vl.c | 1 + 1 file changed, 1 insertion(+) Signed-off-by: Miroslav Rezanina --- vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index b9074c5..781c352 100644 --- a/vl.c +++ b/vl.c @@ -3165,6 +3165,7 @@ int main(int argc, char **argv, char **envp) exit(1); } sz = QEMU_ALIGN_UP((uint64_t)value, 8192); + sz = MAX(sz, 2 * 1024 * 1024); ram_size = sz; if (ram_size != sz) { fprintf(stderr, "qemu: ram size too large\n"); -- 1.7.1