From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: How to determine if I am running under Xen? Date: Fri, 21 Sep 2007 07:23:36 +0100 Message-ID: <1190355816.31176.9.camel@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: James Harper Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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.