Module Name:    src
Committed By:   msaitoh
Date:           Sun Mar 24 04:43:54 UTC 2019

Modified Files:
        src/usr.sbin/cpuctl/arch: i386.c

Log Message:
 Add HAXM.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/usr.sbin/cpuctl/arch/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.94 src/usr.sbin/cpuctl/arch/i386.c:1.95
--- src/usr.sbin/cpuctl/arch/i386.c:1.94	Fri Mar 22 04:39:02 2019
+++ src/usr.sbin/cpuctl/arch/i386.c	Sun Mar 24 04:43:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.94 2019/03/22 04:39:02 msaitoh Exp $	*/
+/*	$NetBSD: i386.c,v 1.95 2019/03/24 04:43:54 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.94 2019/03/22 04:39:02 msaitoh Exp $");
+__RCSID("$NetBSD: i386.c,v 1.95 2019/03/24 04:43:54 msaitoh Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -1716,6 +1716,7 @@ cpu_probe_hv_features(struct cpu_info *c
 		/*
 		 * HV vendor	ID string
 		 * ------------+--------------
+		 * HAXM		"HAXMHAXMHAXM"
 		 * KVM		"KVMKVMKVM"
 		 * Microsoft	"Microsoft Hv"
 		 * QEMU(TCG)	"TCGTCGTCGTCG"
@@ -1723,7 +1724,9 @@ cpu_probe_hv_features(struct cpu_info *c
 		 * Xen		"XenVMMXenVMM"
 		 * NetBSD	"___ NVMM ___"
 		 */
-		if (strncmp(hv_sig, "KVMKVMKVM", 9) == 0)
+		if (strncmp(hv_sig, "HAXMHAXMHAXM", 12) == 0)
+			hv_name = "HAXM";
+		else if (strncmp(hv_sig, "KVMKVMKVM", 9) == 0)
 			hv_name = "KVM";
 		else if (strncmp(hv_sig, "Microsoft Hv", 12) == 0)
 			hv_name = "Hyper-V";

Reply via email to