On 24/04/12 14:04, Avi Kivity wrote: [...] >> + int tid; >> + int i; >> + >> + tid = vcpu->run->s.regs.gprs[(vcpu->arch.sie_block->ipa & 0xf0) >> 4]; >> + vcpu->stat.diagnose_9c++; >> + VCPU_EVENT(vcpu, 5, "diag time slice end directed to %d", tid); >> + >> + if (tid == vcpu->vcpu_id) >> + return 0; >> + >> + kvm_for_each_vcpu(i, tcpu, kvm) { >> + if (tcpu->vcpu_id == tid) { > > Can two vcpus match the same tid? Dont think so. tid (target id) is the cpu number of the CPU holding the spinlock and vcpu_id is checked for in kvm_vcpu_init to be unique. [...] >> + vcpu_put(vcpu); >> + if (yield_to(task, 1)) { >> + vcpu_load(vcpu); > > vcpu_put()/_load()s are unneeded here, preempt notifiers will > automatically call kvm_arch_vcpu_put()/_load() if we schedule. Right. Will send an updated patch. [...] >> @@ -74,6 +74,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { >> { "instruction_sigp_restart", VCPU_STAT(instruction_sigp_restart) }, >> { "diagnose_10", VCPU_STAT(diagnose_10) }, >> { "diagnose_44", VCPU_STAT(diagnose_44) }, >> + { "diagnose_9c", VCPU_STAT(diagnose_9c) }, >> { NULL } >> }; >> > > We're switching to tracepoints instead of homebrewed statistics. It's > in feature-removal-schedule.txt already. It's okay to add them now, but > please prepare for their removal. Yes, we have started with some tracepoint code conversion. We will try to speed up a bit. Christian -- 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