WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Kip Macy <kip.macy@xxxxxxxxx>
Subject: Re: [Xen-devel] questions about adding MP support to gdbserver
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 14 Nov 2005 10:07:23 +0000
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: Mon, 14 Nov 2005 10:02:08 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b1fa29170511132125g1a62cbe5yfd5f516a876c2361@xxxxxxxxxxxxxx>
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>
References: <b1fa29170511132125g1a62cbe5yfd5f516a876c2361@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

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

<Prev in Thread] Current Thread [Next in Thread>