This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] How to query the number of vcpus?

To: Ryan Harper <ryanh@xxxxxxxxxx>
Subject: Re: [Xen-devel] How to query the number of vcpus?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sat, 30 Apr 2005 10:23:24 +0100
Cc: Kip Macy <kip.macy@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, christian.limpach@xxxxxxxxxxxx
Delivery-date: Sat, 30 Apr 2005 09:23:10 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: Your message of "Fri, 29 Apr 2005 15:18:15 CDT." <20050429201815.GA7415@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> * 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

It probably makes sense to rename cpumap to vcpumask, or at least to

Also I'd change the appearances of the mask in the dom0 interface from:
 cpumap_t cpumap[MAX_VIRT_CPUS]
 cpumap_t *cpumap
 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