On 26.04.2012, at 14:19, Christian Borntraeger wrote:
>>> + kvm_for_each_vcpu(i, tcpu, kvm)
>>> + if (tcpu->vcpu_id == tid) {
>>
>> Wouldn't
>>
>> kvm_get_vcpu(kvm, tid)
>>
>> be what you want here?
>
> Would be better in terms of scalability, but we can do that
> only if kvm->vcpus[i].vcpu_id = i
> Is that always the case?
Ugh, unfortunately not. How about creating a tid -> vcpu map on init? Looping
through all vcpus just to find the one with a static, linar id sounds a bit
excessive to me :).
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