2009-06-24 16:43:44 +00:00
|
|
|
From 803934e62dc6394df92ef08fc8df9e49c0c834e7 Mon Sep 17 00:00:00 2001
|
2009-04-19 11:02:16 +00:00
|
|
|
From: Glauber Costa <glommer@redhat.com>
|
2009-06-24 16:43:44 +00:00
|
|
|
Date: Wed, 24 Jun 2009 14:28:30 +0100
|
|
|
|
Subject: [PATCH 12/18] align vga rom to 4k boundary.
|
2009-04-19 11:02:16 +00:00
|
|
|
|
|
|
|
Instead of aligning to 2k boundary, as required by the bios,
|
|
|
|
align to 4k boundary, as required by kvm memory functions. Without
|
|
|
|
this patch, starting kvm with -vga std option fails with:
|
|
|
|
|
|
|
|
create_userspace_phys_mem: Invalid argument
|
|
|
|
kvm_cpu_register_physical_memory: failed
|
|
|
|
|
|
|
|
as described by: https://bugzilla.redhat.com/494376
|
|
|
|
|
|
|
|
It does not fail with cirrus vga, because it is naturally aligned.
|
|
|
|
This problem does not seem to affect upstream qemu.
|
|
|
|
|
|
|
|
Signed-off-by: Glauber Costa <glommer@redhat.com>
|
2009-06-24 16:43:44 +00:00
|
|
|
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
|
2009-04-19 11:02:16 +00:00
|
|
|
---
|
2009-06-24 16:43:44 +00:00
|
|
|
hw/pc.c | 2 +-
|
2009-04-19 11:02:16 +00:00
|
|
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
|
|
2009-06-24 16:43:44 +00:00
|
|
|
diff --git a/hw/pc.c b/hw/pc.c
|
|
|
|
index 413da6f..fb6edf4 100644
|
|
|
|
--- a/hw/pc.c
|
|
|
|
+++ b/hw/pc.c
|
2009-05-31 14:42:34 +00:00
|
|
|
@@ -925,7 +925,7 @@ vga_bios_error:
|
2009-04-19 11:02:16 +00:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
/* Round up vga bios size to the next 2k boundary */
|
|
|
|
- vga_bios_size = (vga_bios_size + 2047) & ~2047;
|
|
|
|
+ vga_bios_size = (vga_bios_size + 4095) & ~4095;
|
|
|
|
option_rom_start = 0xc0000 + vga_bios_size;
|
|
|
|
|
|
|
|
/* setup basic memory access */
|
2009-06-24 16:43:44 +00:00
|
|
|
--
|
|
|
|
1.6.2.2
|
|
|
|
|