All of lore.kernel.org
 help / color / mirror / Atom feed
* How to determine if I am running under Xen?
@ 2007-09-21  4:04 James Harper
  2007-09-21  4:30 ` Chris Lalancette
  2007-09-21  6:23 ` Ian Campbell
  0 siblings, 2 replies; 3+ messages in thread
From: James Harper @ 2007-09-21  4:04 UTC (permalink / raw)
  To: xen-devel

Does anyone have a code snippet that I could use (in kernel space) to
determine if I am running under Xen or not in a HVM domain?

Thanks

James

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

* Re: How to determine if I am running under Xen?
  2007-09-21  4:04 How to determine if I am running under Xen? James Harper
@ 2007-09-21  4:30 ` Chris Lalancette
  2007-09-21  6:23 ` Ian Campbell
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Lalancette @ 2007-09-21  4:30 UTC (permalink / raw)
  To: James Harper; +Cc: xen-devel

James Harper wrote:
> Does anyone have a code snippet that I could use (in kernel space) to
> determine if I am running under Xen or not in a HVM domain?
> 
> Thanks
> 
> James

I don't have a code snippet....but a script I saw around here basically 
did "cat /proc/acpi/dsdt | grep xen" to determine whether they were on 
an HVM domain or not.  You can probably pretty easily call the same 
functions that generate the dsdt from the kernel to determine the 
information.

Chris Lalancette

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

* Re: How to determine if I am running under Xen?
  2007-09-21  4:04 How to determine if I am running under Xen? James Harper
  2007-09-21  4:30 ` Chris Lalancette
@ 2007-09-21  6:23 ` Ian Campbell
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2007-09-21  6:23 UTC (permalink / raw)
  To: James Harper; +Cc: xen-devel

On Fri, 2007-09-21 at 14:04 +1000, James Harper wrote:
> Does anyone have a code snippet that I could use (in kernel space) to
> determine if I am running under Xen or not in a HVM domain?

"cpuid eax=0x40000000" will return XenVMMXenVMM in (ebx,ecx,edx) or you
could just look for the Xen PCI device -- see unmodified_drivers in the
xen source for examples of both.

Ian.

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

end of thread, other threads:[~2007-09-21  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-21  4:04 How to determine if I am running under Xen? James Harper
2007-09-21  4:30 ` Chris Lalancette
2007-09-21  6:23 ` Ian Campbell

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.