Fix segfault when qemu-kvm is invoked inside a VM (#516543)
This commit is contained in:
parent
6db7331a09
commit
9d0bd0d10b
34
qemu-fix-no-kvm-segfault.patch
Normal file
34
qemu-fix-no-kvm-segfault.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From add286b6e753f14e4ae0ab6b831441aea0d35497 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Richard Jones <rjones@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
|
||||||
|
|
17
qemu.spec
17
qemu.spec
@ -34,6 +34,19 @@ Patch05: qemu-fix-extboot-signrom.patch
|
|||||||
# Fix virtio_net with -net user (bug #516022)
|
# Fix virtio_net with -net user (bug #516022)
|
||||||
Patch06: qemu-fix-vnet-hdr-slirp-bustage.patch
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
|
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
|
||||||
BuildRequires: rsync dev86 iasl
|
BuildRequires: rsync dev86 iasl
|
||||||
@ -220,6 +233,7 @@ such as kvmtrace and kvm_stat.
|
|||||||
%patch04 -p1
|
%patch04 -p1
|
||||||
%patch05 -p1
|
%patch05 -p1
|
||||||
%patch06 -p1
|
%patch06 -p1
|
||||||
|
%patch07 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# systems like rhel build system does not have a recent enough linker so
|
# 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*
|
%{_mandir}/man1/qemu-img.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 20 2009 Richard W.M. Jones <rjones@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@redhat.com> - 2:0.10.91-0.7.rc1
|
* Tue Aug 18 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.91-0.7.rc1
|
||||||
- Fix permissions on udev rules (#517571)
|
- Fix permissions on udev rules (#517571)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user