Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Apr 2011 22:23:39 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221188 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
Message-ID:  <201104282223.p3SMNdeJ068703@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Thu Apr 28 22:23:39 2011
New Revision: 221188
URL: http://svn.freebsd.org/changeset/base/221188

Log:
  Define "Hypervisor Present" bit.  This bit is used by several hypervisors to
  identify CPUs running under emulation.  Currently QEMU-KVM, Xen-HVM, VMware,
  and MS Hyper-V are known to set this bit.
  
  MFC after:	3 days

Modified:
  head/sys/amd64/amd64/identcpu.c
  head/sys/amd64/include/specialreg.h
  head/sys/i386/i386/identcpu.c
  head/sys/i386/include/specialreg.h

Modified: head/sys/amd64/amd64/identcpu.c
==============================================================================
--- head/sys/amd64/amd64/identcpu.c	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/amd64/amd64/identcpu.c	Thu Apr 28 22:23:39 2011	(r221188)
@@ -296,7 +296,7 @@ printcpuinfo(void)
 				"\035<b28>"
 				"\036<b29>"
 				"\037<b30>"
-				"\040<b31>"
+				"\040HV"	/* Hypervisor */
 				);
 			}
 

Modified: head/sys/amd64/include/specialreg.h
==============================================================================
--- head/sys/amd64/include/specialreg.h	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/amd64/include/specialreg.h	Thu Apr 28 22:23:39 2011	(r221188)
@@ -134,6 +134,7 @@
 #define	CPUID2_MOVBE	0x00400000
 #define	CPUID2_POPCNT	0x00800000
 #define	CPUID2_AESNI	0x02000000
+#define	CPUID2_HV	0x80000000
 
 /*
  * Important bits in the Thermal and Power Management flags

Modified: head/sys/i386/i386/identcpu.c
==============================================================================
--- head/sys/i386/i386/identcpu.c	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/i386/i386/identcpu.c	Thu Apr 28 22:23:39 2011	(r221188)
@@ -773,7 +773,7 @@ printcpuinfo(void)
 				"\035<b28>"
 				"\036<b29>"
 				"\037<b30>"
-				"\040<b31>"
+				"\040HV"	/* Hypervisor */
 				);
 			}
 

Modified: head/sys/i386/include/specialreg.h
==============================================================================
--- head/sys/i386/include/specialreg.h	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/i386/include/specialreg.h	Thu Apr 28 22:23:39 2011	(r221188)
@@ -131,6 +131,7 @@
 #define	CPUID2_MOVBE	0x00400000
 #define	CPUID2_POPCNT	0x00800000
 #define	CPUID2_AESNI	0x02000000
+#define	CPUID2_HV	0x80000000
 
 /*
  * Important bits in the Thermal and Power Management flags



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104282223.p3SMNdeJ068703>