[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] questions about adding MP support to gdbserver




Why doesn't GETDOMAININFO return a bitmask of online vcpus? It looks as if the only way to find out what vcpus are online is to iterate through, up to maxvcpuid.

Yes, that's the correct approach.

Do GETVCPUINFO and GETVCPUCONTEXT take vcpuids? In other words, if I have 4 cpus online I do a get call on 3, down 2, then do a get call on 3 again, will I get the same result?

Yes.

Where is an example of userspace code iterating through the online vcpus?
http://lists.xensource.com/xen-devel

There are examples in xenstat, but it uses its own interface library (not libxenctrl) so it will probably only confuse. You have the right approach described above anyway:
 1. getdomaininfo
 2. for (i = 0; i <= info.max_vcpu_id; i++)
 3.     getvcpuinfo / getvcpucontext
 4.     info.online tells you whether the vcpu is up or down
5. either way, getvcpucontext will succeed if the domU has booted that vcpu

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.