diff --git a/qemu-roms-more-room-fix-vga-align.patch b/qemu-roms-more-room-fix-vga-align.patch new file mode 100644 index 0000000..2c1d21c --- /dev/null +++ b/qemu-roms-more-room-fix-vga-align.patch @@ -0,0 +1,35 @@ +From: Glauber Costa +Subject: [PATCH] align vga rom to 4k boundary. + +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 +--- + qemu/hw/pc.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c +index cc84772..680d4a2 100644 +--- a/qemu/hw/pc.c ++++ b/qemu/hw/pc.c +@@ -919,7 +919,7 @@ vga_bios_error: + 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 */ +-- +1.5.6.6 diff --git a/qemu.spec b/qemu.spec index d7ab381..613f54a 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 0.10 -Release: 8%{?dist} +Release: 9%{?dist} # I have mistakenly thought the revision name would be 1.0. # So 0.10 series get Epoch = 1 Epoch: 2 @@ -34,9 +34,10 @@ Patch9: kvm-upstream-ppc.patch Patch10: qemu-fix-debuginfo.patch Patch11: qemu-fix-gcc.patch Patch12: qemu-roms-more-room.patch -Patch13: qemu-bios-bigger-roms.patch -Patch14: qemu-fix-display-breakage.patch -Patch15: qemu-fix-qcow2-2TB.patch +Patch13: qemu-roms-more-room-fix-vga-align.patch +Patch14: qemu-bios-bigger-roms.patch +Patch15: qemu-fix-display-breakage.patch +Patch16: qemu-fix-qcow2-2TB.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel @@ -222,6 +223,7 @@ such as kvmtrace and kvm_stat. %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 %build # systems like rhel build system does not have a recent enough linker so @@ -463,6 +465,9 @@ fi %{_mandir}/man1/qemu-img.1* %changelog +* Sun Apr 19 2009 Mark McLoughlin - 2:0.10-9 +- Align VGA ROM to 4k boundary - fixes 'qemu-kvm -std vga' (#494376) + * Tue Apr 14 2009 Glauber Costa - 2:0.10-8 - Provide qemu-kvm conditional on the architecture.