svn commit: r221188 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include

Jung-uk Kim jkim at FreeBSD.org
Thu Apr 28 22:23:39 UTC 2011


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


More information about the svn-src-head mailing list