summaryrefslogtreecommitdiff
path: root/sys/dev/pv/hyperv.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-05 13:17:23 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-05 13:17:23 +0000
commit29b7ca2c7c0d7dfc51f5371ccfdd51465de2c07d (patch)
tree3c92e94c098f540a4986083cb58e144d76c51a58 /sys/dev/pv/hyperv.c
parent385cc1a6a7d364a53040c00955c4b96a987c5356 (diff)
Microsoft has allocated us a SubID that we can use to identify OpenBSD
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r--sys/dev/pv/hyperv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index d77fa7ecb6d..27563fadaf9 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -335,9 +335,9 @@ hv_set_version(struct hv_softc *sc)
{
uint64_t ver;
- /* OpenBSD 6.0 */
- ver = 0x8300ULL << 48;
- ver |= 6 << 16;
+ /* OpenBSD build date */
+ ver = MSR_HV_GUESTID_OSTYPE_OPENBSD;
+ ver |= OpenBSD << MSR_HV_GUESTID_VERSION_SHIFT;
wrmsr(MSR_HV_GUEST_OS_ID, ver);
}