|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] How to query the number of vcpus?
> * Kip Macy <kip.macy@xxxxxxxxx> [2005-04-29 15:09]:
> > What is the right way to query how many vcpus a guest is using? As I
> > mentioned earlier it would seem to fall under the heading of
> > GETDOMAININFO, but that obviously doesn't work.
>
> I posted a [1]patch a while back that surfaced that info in the
> GETDOMAININFO call. I'm still working more into that patch to support
> a cpumap which designate which physical cpus a vcpu may use, the current
> form of that patch is [2]here.
>
> 1. http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00412.html
> 2. http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00890.html
There's already a cpumask in Xen for physical CPUs (or will be -- it's
called cpuset right now, but that's going to change to fit the Linux
convention).
It probably makes sense to rename cpumap to vcpumask, or at least to
vcpumap.
Also I'd change the appearances of the mask in the dom0 interface from:
cpumap_t cpumap[MAX_VIRT_CPUS]
And:
cpumap_t *cpumap
To:
u8 vcpumask[MAX_VCPUID/8]
Having an array of '_t' is odd as each entry in the array is really
logically just a single bit. And I would like to separate the size of
the array at the admin interfaces from MAX_VIRT_CPUS: it would be nice
to be able to increase MAX_VIRT_CPUS without changing the admin
interface. That's why I'd add something like MAX_VCPUID (probably set
it to 256).
I cc'ed Christian because he is merging one of your patches at the
moment. It might be the one without the cpumap additions though.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|