[fedora-virt-maint] rpms/qemu/F-11 qemu-fix-load-linux.patch, NONE, 1.1 qemu.spec, 1.87, 1.88

Glauber Costa glommer at fedoraproject.org
Tue May 12 13:34:46 UTC 2009


Author: glommer

Update of /cvs/pkgs/rpms/qemu/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26659

Modified Files:
	qemu.spec 
Added Files:
	qemu-fix-load-linux.patch 
Log Message:
fix boot with -kernel parameter



qemu-fix-load-linux.patch:

--- NEW FILE qemu-fix-load-linux.patch ---
>From d6ecb03610dba922cbfde42acb41603e2c658047 Mon Sep 17 00:00:00 2001
From: Glauber Costa <glommer at redhat.com>
Date: Fri, 8 May 2009 02:22:13 -0300
Subject: [PATCH 2/2] reset state for load_linux

The linux loader is just an option rom like any other, just with
some special requirements. Right now, our option rom resetting
mechanism is not being applied to it. As a result, users using
-kernel will not be able to successfully reboot their machines

This patch fixes it by saving all the data we generated in
the load_linux() function, to be used later by the option rom
resetting mechanism.

Signed-off-by: Glauber Costa <glommer at redhat.com>
Signed-off-by: Anthony Liguori <aliguori at us.ibm.com>
---
 hw/pc.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Index: qemu-kvm-0.10/qemu/hw/pc.c
===================================================================
--- qemu-kvm-0.10.orig/qemu/hw/pc.c
+++ qemu-kvm-0.10/qemu/hw/pc.c
@@ -527,6 +527,7 @@ static void generate_bootsect(uint8_t *o
     rom[sizeof(rom) - 1] = -sum;
 
     memcpy(option_rom, rom, sizeof(rom));
+    option_rom_setup_reset(option_rom, sizeof (rom));
 }
 
 static long get_file_size(FILE *f)
@@ -694,6 +695,12 @@ static void load_linux(uint8_t *option_r
     memset(gpr, 0, sizeof gpr);
     gpr[4] = cmdline_addr-real_addr-16;	/* SP (-16 is paranoia) */
 
+    option_rom_setup_reset(real_addr, setup_size);
+    option_rom_setup_reset(prot_addr, kernel_size);
+    option_rom_setup_reset(cmdline_addr, cmdline_size);
+    if (initrd_filename)
+        option_rom_setup_reset(initrd_addr, initrd_size);
+
     generate_bootsect(option_rom, gpr, seg, 0);
 }
 


Index: qemu.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qemu/F-11/qemu.spec,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -p -r1.87 -r1.88
--- qemu.spec	1 May 2009 12:13:58 -0000	1.87
+++ qemu.spec	12 May 2009 13:34:16 -0000	1.88
@@ -1,7 +1,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 0.10
-Release: 16%{?dist}
+Release: 17%{?dist}
 # I have mistakenly thought the revision name would be 1.0.
 # So 0.10 series get Epoch = 1
 Epoch: 2
@@ -37,6 +37,7 @@ Patch14: qemu-bios-bigger-roms.patch
 Patch15: qemu-fix-display-breakage.patch
 Patch16: qemu-fix-qcow2-2TB.patch
 Patch17: qemu-fix-qcow2-corruption.patch
+Patch18: qemu-fix-load-linux.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
@@ -234,6 +235,7 @@ such as kvmtrace and kvm_stat.
 %patch15 -p1
 %patch16 -p1
 %patch17 -p1
+%patch18 -p1
 
 %build
 # systems like rhel build system does not have a recent enough linker so
@@ -478,6 +480,9 @@ fi
 %{_mandir}/man1/qemu-img.1*
 
 %changelog
+* Tue May 12 2009 Glauber Costa <glommer at redhat.com> - 2:0.10-17
+- fix reboot with -kernel parameter
+
 * Fri May  1 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10-16
 - Really provide qemu-kvm as a metapackage
 




More information about the Fedora-virt-maint mailing list