summaryrefslogtreecommitdiff
path: root/sys/dev/pv/hyperv.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-16 11:54:27 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-16 11:54:27 +0000
commit1859492effa12ded8c35fe0796452e20d98e65f6 (patch)
tree73df3a8320e76e839381c8b51b2f3ceb8447a791 /sys/dev/pv/hyperv.c
parent908b7217f86122527dd2b73bd358049a609c724a (diff)
Make sure we're producing a 64-bit value when shifting left
Reported by brad and kettenis separately; Mark has even sent me a diff and told to commit it with OK kettenis.
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r--sys/dev/pv/hyperv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index 27563fadaf9..2d0a38fabc7 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -337,7 +337,7 @@ hv_set_version(struct hv_softc *sc)
/* OpenBSD build date */
ver = MSR_HV_GUESTID_OSTYPE_OPENBSD;
- ver |= OpenBSD << MSR_HV_GUESTID_VERSION_SHIFT;
+ ver |= (uint64_t)OpenBSD << MSR_HV_GUESTID_VERSION_SHIFT;
wrmsr(MSR_HV_GUEST_OS_ID, ver);
}