b77f8ba
From aa1620047bb49079f4c114326d43fb9aa7a26065 Mon Sep 17 00:00:00 2001
b77f8ba
From: Richard Jones <rjones@redhat.com>
9d0bd0d
Date: Thu, 20 Aug 2009 13:52:20 +0100
9d0bd0d
Subject: [PATCH] Workaround segfault when qemu-kvm runs inside a VM (RHBZ#516543).
9d0bd0d
9d0bd0d
Regression was introduced by this commit:
9d0bd0d
http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=b8083e930efc1ee85a7ad7e700dbd0f52ebb32dd
9d0bd0d
9d0bd0d
Upstream discussion:
9d0bd0d
http://www.mail-archive.com/kvm@vger.kernel.org/msg19890.html
9d0bd0d
9d0bd0d
Note: NOT UPSTREAM and this is something of a hack.  Upstream are
9d0bd0d
still debating how they really want to fix this.
b77f8ba
b77f8ba
Signed-off-by: Richard Jones <rjones@redhat.com>
b77f8ba
Fedora-patch: qemu-fix-no-kvm-segfault.patch
9d0bd0d
---
9d0bd0d
 exec.c |    3 ---
9d0bd0d
 1 files changed, 0 insertions(+), 3 deletions(-)
9d0bd0d
9d0bd0d
diff --git a/exec.c b/exec.c
b77f8ba
index 88bcff5..721fcff 100644
9d0bd0d
--- a/exec.c
9d0bd0d
+++ b/exec.c
b77f8ba
@@ -421,9 +421,6 @@ static uint8_t static_code_gen_buffer[DEFAULT_CODE_GEN_BUFFER_SIZE];
9d0bd0d
 
9d0bd0d
 static void code_gen_alloc(unsigned long tb_size)
9d0bd0d
 {
9d0bd0d
-    if (kvm_enabled())
9d0bd0d
-        return;
9d0bd0d
-
9d0bd0d
 #ifdef USE_STATIC_CODE_GEN_BUFFER
9d0bd0d
     code_gen_buffer = static_code_gen_buffer;
9d0bd0d
     code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
9d0bd0d
-- 
b77f8ba
1.6.2.5
9d0bd0d