>Sorry for that something is wrong with my code posted earlier.
>Just now, I found a bug in it, which was introduced by my porting my
>work(which is developed under KVM83 and using svn depository) to KVM's
>git depository by hand. The bug is : you can not shutdown SMP guest
>by killing the related qemu process.
the bug is fixed. it seems that once a spinlock is acquired,
Linux2.6.29 prohibits scheduling out
the spinlock holder. so, patch 7 has to be modified:
static void kvm_destroy_vm(struct kvm *kvm)
{
+ int i;
struct mm_struct *mm = kvm->mm;
kvm_arch_sync_events(kvm);
+ if(!kvm->is_paused_by_controller)
+ vm_pause(kvm);
+ for(i = 0; i < KVM_MAX_VCPUS; ++i) {
+ if (kvm->vcpus[i]) {
+ sched_destroy_vcpu(kvm->vcpus[i]);
+ }
+ }
+ sched_destroy_vm(kvm);
spin_lock(&kvm_lock);
list_del(&kvm->vm_list);
spin_unlock(&kvm_lock);
Regards,
alex.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html