Skip to content

Commit

Permalink
KVM: ia64: Remove lock held by halted vcpu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xiantao Zhang authored and Avi Kivity committed Dec 31, 2008
1 parent a917f7a commit 853dafb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/ia64/kvm/kvm-ia64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
Expand Down

0 comments on commit 853dafb

Please sign in to comment.