summaryrefslogtreecommitdiff
path: root/sys/dev/pv/vmt.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2015-07-28 09:48:53 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2015-07-28 09:48:53 +0000
commitcdfe07c2c63e23578d8660f905155c1f47edd3c1 (patch)
tree062ec98552bbd89ef20a69e78494ffacd9469ad4 /sys/dev/pv/vmt.c
parentd87365302c7784a5c3988360e22cc890d5a05fec (diff)
Add callbacks for supported hypervisors in pvbus(4) to print more
information and for some generic CPUID/MSR-level initialization. This changes the attach/match path a bit. Hypervisor informatiom may include a version number, for example: pvbus0 at mainbus0: Hyper-V 6.3.9600 OK mlarkin@
Diffstat (limited to 'sys/dev/pv/vmt.c')
-rw-r--r--sys/dev/pv/vmt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pv/vmt.c b/sys/dev/pv/vmt.c
index 52f9cd884bc..0281b4e39b8 100644
--- a/sys/dev/pv/vmt.c
+++ b/sys/dev/pv/vmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmt.c,v 1.2 2015/07/21 17:59:58 reyk Exp $ */
+/* $OpenBSD: vmt.c,v 1.3 2015/07/28 09:48:52 reyk Exp $ */
/*
* Copyright (c) 2007 David Crawshaw <david@zentus.com>
@@ -318,9 +318,10 @@ vmt_probe(void)
int
vmt_match(struct device *parent, void *match, void *aux)
{
- struct pv_attach_args *pva = aux;
+ struct pv_attach_args *pva = aux;
+ struct pvbus_hv *hv = &pva->pva_hv[PVBUS_VMWARE];
- if ((pva->pva_types & PVBUS_VMWARE) == 0)
+ if (hv->hv_base == 0)
return (0);
if (!vmt_probe())
return (0);