All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: simple check for domU?
@ 2005-11-12  1:33 James Harper
  2005-11-12  2:26 ` Chris Bainbridge
  0 siblings, 1 reply; 7+ messages in thread
From: James Harper @ 2005-11-12  1:33 UTC (permalink / raw)
  To: Chris Bainbridge, NAHieu; +Cc: Xen development list

> 
> If there's no easy and reliable way to do this maybe one should be
added?
> 

You probably need to clarify exactly what you are asking. If you are
running a -xen kernel instead of -xen[0U], then it's the same kernel but
differing in what privileges you have. In theory (I hope I'm right when
I say this), it is possible to give a domU kernel some access to
hardware, so even the line between a privileged or not kernel is a
little blurred. 

If you had CONFIG_ICONFIG set in your .config, you could grep for
various config options in proc, which would tell you if the kernel was
compiled with backend or frontend support, but that still doesn't really
help much.

James

^ permalink raw reply	[flat|nested] 7+ messages in thread
* simple check for domU?
@ 2005-11-11  0:23 Chris Bainbridge
  2005-11-11  1:52 ` Karsten M. Self
  2005-11-11 18:14 ` NAHieu
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Bainbridge @ 2005-11-11  0:23 UTC (permalink / raw)
  To: Xen development list

Hi, is there a simple way to check that we're running under a domU? So
far I came up with:

[[ -d /proc/xen && ! -z `ls /sys/bus/xen/devices/` ]]

or

-e /sys/bus/xen/drivers/vbd || -e /sys/bus/xen/drivers/vif

Neither of which is pretty, and I'm not convinced they work under all
circumstances. This is useful for system setup scripts to do different
things depending if they are run under dom0/U.

Thanks,
Chris

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-12  2:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-12  1:33 simple check for domU? James Harper
2005-11-12  2:26 ` Chris Bainbridge
  -- strict thread matches above, loose matches on Subject: below --
2005-11-11  0:23 Chris Bainbridge
2005-11-11  1:52 ` Karsten M. Self
2005-11-11 16:21   ` Chris Bainbridge
2005-11-11 18:14 ` NAHieu
2005-11-11 20:33   ` Chris Bainbridge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.