rpms/kvm/devel kvm-65-kernel-virtio-boot.patch, NONE, 1.1 kvm.spec, 1.52, 1.53

Mark McLoughlin (markmc) fedora-extras-commits at redhat.com
Tue Apr 29 13:39:04 UTC 2008


Author: markmc

Update of /cvs/pkgs/rpms/kvm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2998

Modified Files:
	kvm.spec 
Added Files:
	kvm-65-kernel-virtio-boot.patch 
Log Message:
* Tue Apr 29 2008 Mark McLoughlin <markmc at redhat.com> - 65-2
- Fix -kernel with virtio/extboot drives (#444578)


kvm-65-kernel-virtio-boot.patch:

--- NEW FILE kvm-65-kernel-virtio-boot.patch ---
>From 6fe1fdc57802c699022d3b54920a435daabef969 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Tue, 29 Apr 2008 11:30:42 +0100
Subject: [PATCH] kvm: qemu: Allow booting from extboot drive with -kernel

The -kernel option generates a new boot sector for
the boot drive which jumps directly to the supplied
kernel rather than running the standard bootloader.

Trivially fix generate_bootsect() to handle the
case where we're booting using extboot.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 qemu/hw/pc.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
index 48a36e0..506ef6b 100644
--- a/qemu/hw/pc.c
+++ b/qemu/hw/pc.c
@@ -405,11 +405,12 @@ static void generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip)
 {
     uint8_t bootsect[512], *p;
     int i;
-    int hda;
+    int hda = extboot_drive;
 
-    hda = drive_get_index(IF_IDE, 0, 0);
+    if (hda == -1)
+      hda = drive_get_index(IF_IDE, 0, 0);
     if (hda == -1) {
-	fprintf(stderr, "A disk image must be given for 'hda' when booting "
+	fprintf(stderr, "-hda or -drive boot=on must be given when booting "
 		"a Linux kernel\n");
 	exit(1);
     }
-- 
1.5.4.1



Index: kvm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kvm/devel/kvm.spec,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- kvm.spec	8 Apr 2008 19:47:56 -0000	1.52
+++ kvm.spec	29 Apr 2008 13:38:27 -0000	1.53
@@ -1,7 +1,7 @@
 Summary: Kernel-based Virtual Machine
 Name: kvm
 Version: 65
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ and LGPLv2+
 Group: Development/Tools
 URL: http://%{name}.sf.net
@@ -11,6 +11,7 @@
 Patch1: %{name}-bootmenu.patch
 Patch2: %{name}-62-block-rw-range-check.patch
 Patch3: %{name}-62-e1000-default.patch
+Patch4: %{name}-65-kernel-virtio-boot.patch
 # patches from upstream qemu
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel
@@ -43,6 +44,7 @@
 %patch1 -p1
 %patch2 -p1
 #patch3 -p1
+%patch4 -p1
 
 %build
 # we need to install the data bits in a different path
@@ -97,6 +99,9 @@
 %{_sysconfdir}/sysconfig/modules/%{name}.modules
 
 %changelog
+* Tue Apr 29 2008 Mark McLoughlin <markmc at redhat.com> - 65-2
+- Fix -kernel with virtio/extboot drives (#444578)
+
 * Tue Apr  8 2008 Jeremy Katz <katzj at redhat.com> - 65-1
 - Update to kvm-65 to fix smp instability
 




More information about the fedora-extras-commits mailing list