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

Re: [Xen-devel] determining if kernel is dom0 kernel or not.


  • To: jd <jdsw2002@xxxxxxxxx>, xendevel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Wed, 11 Jul 2007 20:18:58 +0100
  • Delivery-date: Wed, 11 Jul 2007 12:16:57 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcfD8FR2ky+O6i/jEdyh5AAX8io7RQ==
  • Thread-topic: [Xen-devel] determining if kernel is dom0 kernel or not.

If you are looking for running on Xen versus not on Xen (rather than dom0
versus domU), and you are interested in x86 only, then the program in
tools/misc/xen-detect.c is along the lines of what you want (and can be cut
down to size if you just want e.g., a non-zero return code if running on
Xen).

If you want to detect dom0 specifically then that's trickier --
/proc/xen/privcmd for example exists even in a domU, if the kernel is
dom0-capable. You'd have to be root and then try a privileged hypercall. :-)

 -- Keir

On 11/7/07 19:40, "jd" <jdsw2002@xxxxxxxxx> wrote:

> Hi
>   How do I reliably determine if the current kernel is
> dom0 (xen capable) or not ?
>    
>    Presence of some file in  linux /proc/xen and
> solaris /dev/xen/  ?
> 
>    Any platform independent way ? Some python API ?
> Any other ways?
> 
> Thanks
> /Jd
> 
> 
>        
> ______________________________________________________________________________
> ______
> Yahoo! oneSearch: Finally, mobile search
> that gives answers, not web links.
> http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
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®.