Blame qemu-roms-more-room-fix-vga-align.patch

Mark McLoughlin 513689
From: Glauber Costa <glommer@redhat.com>
Mark McLoughlin 513689
Subject: [PATCH] align vga rom to 4k boundary.
Mark McLoughlin 513689
Mark McLoughlin 513689
Instead of aligning to 2k boundary, as required by the bios,
Mark McLoughlin 513689
align to 4k boundary, as required by kvm memory functions. Without
Mark McLoughlin 513689
this patch, starting kvm with -vga std option fails with:
Mark McLoughlin 513689
Mark McLoughlin 513689
create_userspace_phys_mem: Invalid argument
Mark McLoughlin 513689
kvm_cpu_register_physical_memory: failed
Mark McLoughlin 513689
Mark McLoughlin 513689
as described by: https://bugzilla.redhat.com/494376
Mark McLoughlin 513689
Mark McLoughlin 513689
It does not fail with cirrus vga, because it is naturally aligned.
Mark McLoughlin 513689
This problem does not seem to affect upstream qemu.
Mark McLoughlin 513689
Mark McLoughlin 513689
Signed-off-by: Glauber Costa <glommer@redhat.com>
Mark McLoughlin 513689
---
Mark McLoughlin 513689
 qemu/hw/pc.c |    2 +-
Mark McLoughlin 513689
 1 files changed, 1 insertions(+), 1 deletions(-)
Mark McLoughlin 513689
Mark McLoughlin 513689
diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
Mark McLoughlin 513689
index cc84772..680d4a2 100644
Mark McLoughlin 513689
--- a/qemu/hw/pc.c
Mark McLoughlin 513689
+++ b/qemu/hw/pc.c
Mark McLoughlin 513689
@@ -919,7 +919,7 @@ vga_bios_error:
Mark McLoughlin 513689
             exit(1);
Mark McLoughlin 513689
         }
Mark McLoughlin 513689
 	/* Round up vga bios size to the next 2k boundary */
Mark McLoughlin 513689
-	vga_bios_size = (vga_bios_size + 2047) & ~2047;
Mark McLoughlin 513689
+	vga_bios_size = (vga_bios_size + 4095) & ~4095;
Mark McLoughlin 513689
 	option_rom_start = 0xc0000 + vga_bios_size;
Mark McLoughlin 513689
 
Mark McLoughlin 513689
         /* setup basic memory access */
Mark McLoughlin 513689
-- 
Mark McLoughlin 513689
1.5.6.6