public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Debug vcpu add
@ 2010-01-21 11:50 Liu, Jinsong
  2010-01-21 12:31 ` Sheng Yang
  2010-01-23 18:39 ` Marcelo Tosatti
  0 siblings, 2 replies; 3+ messages in thread
From: Liu, Jinsong @ 2010-01-21 11:50 UTC (permalink / raw)
  To: kvm@vger.kernel.org; +Cc: Avi Kivity, Liu, Jinsong

>From 479e84d9ce9d7d78d845f438071a4b1a44aca0bb Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <jinsong.liu@intel.com>
Date: Fri, 22 Jan 2010 03:30:33 +0800
Subject: [PATCH]     Debug vcpu add

    Add 'kvm_vcpu_inited' check so that when adding vcpu it will not
    cause segmentation fault. This is especially necessary when vpu
    hotadd after guestos ready.

    Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
---
 qemu-kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 599c3d6..bdf90b4 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1618,7 +1618,7 @@ static void kvm_do_load_mpstate(void *_env)
 
 void kvm_load_mpstate(CPUState *env)
 {
-    if (kvm_enabled() && qemu_system_ready)
+    if (kvm_enabled() && qemu_system_ready && kvm_vcpu_inited(env))
         on_vcpu(env, kvm_do_load_mpstate, env);
 }
 
-- 
1.6.5.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-23 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 11:50 [PATCH] Debug vcpu add Liu, Jinsong
2010-01-21 12:31 ` Sheng Yang
2010-01-23 18:39 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox