Avi Kivity wrote: > Zhang, Xiantao wrote: >> Before Aps going to block status, it should make sure SIGINT is >> masked, otherwise, it may eat SIGINT from user killing the guest, and >> results in Qemu hanging there, becasue main thread can't get it to >> free guest's resource. >> >> >> diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c >> index a40223f..9929c6f 100644 >> --- a/arch/ia64/kvm/kvm-ia64.c >> +++ b/arch/ia64/kvm/kvm-ia64.c >> @@ -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; >> > > These bits appear unrelated? There is nothing to be proteced by this lock here. If the vcpus go to halt with taking this lock, once other ones want to acquire write lock, they have to wait until all halted vcpus are waken up. Xiantao -- To unsubscribe from this list: send the line "unsubscribe kvm-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html