Module Name: src Committed By: jmcneill Date: Mon Oct 17 22:38:01 UTC 2011
Modified Files: src/sys/arch/x86/include: cpu.h src/sys/arch/x86/x86: cpu.c Log Message: add a "vm" device class for cpufeaturebus To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x86/include/cpu.h cvs rdiff -u -r1.94 -r1.95 src/sys/arch/x86/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/include/cpu.h diff -u src/sys/arch/x86/include/cpu.h:1.38 src/sys/arch/x86/include/cpu.h:1.39 --- src/sys/arch/x86/include/cpu.h:1.38 Tue Sep 20 00:12:23 2011 +++ src/sys/arch/x86/include/cpu.h Mon Oct 17 22:38:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.38 2011/09/20 00:12:23 jym Exp $ */ +/* $NetBSD: cpu.h,v 1.39 2011/10/17 22:38:01 jmcneill Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -200,6 +200,7 @@ struct cpu_info { device_t ci_frequency; /* Frequency scaling technology */ device_t ci_padlock; /* VIA PadLock private storage */ device_t ci_temperature; /* Intel coretemp(4) or equivalent */ + device_t ci_vm; /* Virtual machine guest driver */ struct i386tss ci_tss; /* Per-cpu TSS; shared among LWPs */ char ci_iomap[IOMAPSIZE]; /* I/O Bitmap */ Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.94 src/sys/arch/x86/x86/cpu.c:1.95 --- src/sys/arch/x86/x86/cpu.c:1.94 Thu Oct 6 06:56:29 2011 +++ src/sys/arch/x86/x86/cpu.c Mon Oct 17 22:38:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.94 2011/10/06 06:56:29 mrg Exp $ */ +/* $NetBSD: cpu.c,v 1.95 2011/10/17 22:38:01 jmcneill Exp $ */ /*- * Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.94 2011/10/06 06:56:29 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.95 2011/10/17 22:38:01 jmcneill Exp $"); #include "opt_ddb.h" #include "opt_mpbios.h" /* for MPDEBUG */ @@ -490,6 +490,12 @@ cpu_rescan(device_t self, const char *if ci->ci_temperature = config_found_ia(self, "cpufeaturebus", &cfaa, NULL); } + + if (ci->ci_vm == NULL) { + cfaa.name = "vm"; + ci->ci_vm = config_found_ia(self, + "cpufeaturebus", &cfaa, NULL); + } } return 0; @@ -509,6 +515,9 @@ cpu_childdetached(device_t self, device_ if (ci->ci_temperature == child) ci->ci_temperature = NULL; + + if (ci->ci_vm == child) + ci->ci_vm = NULL; } /*