[fedora-virt-maint] rpms/qemu/devel qemu-fix-no-kvm-segfault.patch, NONE, 1.1 qemu.spec, 1.121, 1.122

Richard W.M. Jones rjones at fedoraproject.org
Thu Aug 20 12:56:38 UTC 2009


Author: rjones

Update of /cvs/pkgs/rpms/qemu/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1116

Modified Files:
	qemu.spec 
Added Files:
	qemu-fix-no-kvm-segfault.patch 
Log Message:
Fix segfault when qemu-kvm is invoked inside a VM (#516543)

qemu-fix-no-kvm-segfault.patch:
 exec.c |    4 ----
 1 file changed, 4 deletions(-)

--- NEW FILE qemu-fix-no-kvm-segfault.patch ---
>From add286b6e753f14e4ae0ab6b831441aea0d35497 Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at f12rawhidex64.home.annexia.org>
Date: Thu, 20 Aug 2009 13:52:20 +0100
Subject: [PATCH] Workaround segfault when qemu-kvm runs inside a VM (RHBZ#516543).

Regression was introduced by this commit:
http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=b8083e930efc1ee85a7ad7e700dbd0f52ebb32dd

Upstream discussion:
http://www.mail-archive.com/kvm@vger.kernel.org/msg19890.html

Note: NOT UPSTREAM and this is something of a hack.  Upstream are
still debating how they really want to fix this.
---
 exec.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/exec.c b/exec.c
index 705bcf2..2091516 100644
--- a/exec.c
+++ b/exec.c
@@ -422,9 +422,6 @@ static uint8_t static_code_gen_buffer[DEFAULT_CODE_GEN_BUFFER_SIZE];
 
 static void code_gen_alloc(unsigned long tb_size)
 {
-    if (kvm_enabled())
-        return;
-
 #ifdef USE_STATIC_CODE_GEN_BUFFER
     code_gen_buffer = static_code_gen_buffer;
     code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
-- 
1.6.4



Index: qemu.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qemu/devel/qemu.spec,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -p -r1.121 -r1.122
--- qemu.spec	18 Aug 2009 10:03:38 -0000	1.121
+++ qemu.spec	20 Aug 2009 12:56:37 -0000	1.122
@@ -34,6 +34,19 @@ Patch05: qemu-fix-extboot-signrom.patch
 # Fix virtio_net with -net user (bug #516022)
 Patch06: qemu-fix-vnet-hdr-slirp-bustage.patch
 
+# Fix segfault when qemu-kvm is invoked inside a VM (where HVM is not
+# available).  RHBZ#516543
+#
+# Regression was introduced by this commit:
+# http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=b8083e930efc1ee85a7ad7e700dbd0f52ebb32dd
+#
+# Upstream discussion:
+# http://www.mail-archive.com/kvm@vger.kernel.org/msg19890.html
+#
+# Note: NOT UPSTREAM and this is something of a hack.  Upstream are
+# still debating how they really want to fix this.
+Patch07: qemu-fix-no-kvm-segfault.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
 BuildRequires: rsync dev86 iasl
@@ -220,6 +233,7 @@ such as kvmtrace and kvm_stat.
 %patch04 -p1
 %patch05 -p1
 %patch06 -p1
+%patch07 -p1
 
 %build
 # systems like rhel build system does not have a recent enough linker so
@@ -484,6 +498,9 @@ getent passwd qemu >/dev/null || \
 %{_mandir}/man1/qemu-img.1*
 
 %changelog
+* Thu Aug 20 2009 Richard W.M. Jones <rjones at redhat.com> - 2:0.10.91-0.8.rc1
+- Fix segfault when qemu-kvm is invoked inside a VM (#516543)
+
 * Tue Aug 18 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.91-0.7.rc1
 - Fix permissions on udev rules (#517571)
 




More information about the Fedora-virt-maint mailing list