[PATCH] Debug vcpu add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 479e84d9ce9d7d78d845f438071a4b1a44aca0bb Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <jinsong.liu@xxxxxxxxx>
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@xxxxxxxxx>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux