Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86 add a "vm" device class for cpufeaturebus
details: https://anonhg.NetBSD.org/src/rev/495f306310b5
branches: trunk
changeset: 770454:495f306310b5
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Oct 17 22:38:01 2011 +0000
description:
add a "vm" device class for cpufeaturebus
diffstat:
sys/arch/x86/include/cpu.h | 3 ++-
sys/arch/x86/x86/cpu.c | 13 +++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diffs (58 lines):
diff -r 966b45dead3a -r 495f306310b5 sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h Mon Oct 17 17:58:43 2011 +0000
+++ b/sys/arch/x86/include/cpu.h Mon Oct 17 22:38:01 2011 +0000
@@ -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 @@
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 */
diff -r 966b45dead3a -r 495f306310b5 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c Mon Oct 17 17:58:43 2011 +0000
+++ b/sys/arch/x86/x86/cpu.c Mon Oct 17 22:38:01 2011 +0000
@@ -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 @@
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 @@
if (ci->ci_temperature == child)
ci->ci_temperature = NULL;
+
+ if (ci->ci_vm == child)
+ ci->ci_vm = NULL;
}
/*
Home |
Main Index |
Thread Index |
Old Index