Avi Kivity wrote: > Jes Sorensen wrote: >>> That's a little ugly -- passing two arguments which describe the >>> vcpu. How about passing env to kvm_create_vcpu() instead? >> >> I am all in favor of doing this, but in order to do so, we have to >> teach libkvm about CPUState - are you ok with that? > > No, libkvm is independent of qemu. > > We can make kvm_create_vcpu(kvm_context_t kvm, int vcpu, void *env), and > pass 'env' as the opaque to all the callbacks, instead of the vcpu number. Hi, I pulled out the part of the patch that does the opague 'env' pointer. It should be pretty straight forward - the vcpu_info patch will go on top of this, but I'll work on that tomorrow. Let me know what you think - this is about as small I can make this patch :-) Tested on ia64. Cheers, Jes