]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
KVM: ia64: Remove lock held by halted vcpu
authorXiantao Zhang <xiantao.zhang@intel.com>
Thu, 23 Oct 2008 07:03:38 +0000 (15:03 +0800)
committerAvi Kivity <avi@redhat.com>
Wed, 31 Dec 2008 14:51:49 +0000 (16:51 +0200)
Remove the lock protection for kvm halt logic, otherwise,
once other vcpus want to acquire the lock, and they have to
wait all vcpus are waken up from halt.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/ia64/kvm/kvm-ia64.c

index 43e45f6afcda03d5fb2ff96b9c2dbbccd26dcd36..70eb829767f4601f5ea36fc91a087d80505fd0e3 100644 (file)
@@ -439,7 +439,6 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu)
                expires = div64_u64(itc_diff, cyc_per_usec);
                kt = ktime_set(0, 1000 * expires);
 
-               down_read(&vcpu->kvm->slots_lock);
                vcpu->arch.ht_active = 1;
                hrtimer_start(p_ht, kt, HRTIMER_MODE_ABS);
 
@@ -452,7 +451,6 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu)
                        if (vcpu->arch.mp_state == KVM_MP_STATE_HALTED)
                                vcpu->arch.mp_state =
                                        KVM_MP_STATE_RUNNABLE;
-               up_read(&vcpu->kvm->slots_lock);
 
                if (vcpu->arch.mp_state != KVM_MP_STATE_RUNNABLE)
                        return -EINTR;