diff mbox

Workaround segfault when qemu-kvm runs inside a VM

Message ID 20090820134621.GA10019@amd.home.annexia.org (mailing list archive)
State New, archived
Headers show

Commit Message

Richard W.M. Jones Aug. 20, 2009, 1:46 p.m. UTC
This was discussed here before so I'll just link to that earlier
discussion:

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

The attached patch is a bit of a hack, but at least it stops qemu-kvm
from segfaulting when hardware virtualization isn't available.

Rich.
diff mbox

Patch

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;