diff options
author | 2017-01-16 11:54:26 +0000 | |
---|---|---|
committer | 2017-01-16 11:54:26 +0000 | |
commit | 5a55fa7ca938b01e54dbdac38c102b32f7c9cea9 (patch) | |
tree | fa0366b89a048f90e26b4c7e2d75105388f04d22 /sys/dev | |
parent | Fix declaration: vsw_dev2sc has been renamed to switch_dev2sc. (diff) | |
download | wireguard-openbsd-5a55fa7ca938b01e54dbdac38c102b32f7c9cea9.tar.xz wireguard-openbsd-5a55fa7ca938b01e54dbdac38c102b32f7c9cea9.zip |
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')
-rw-r--r-- | sys/dev/pv/hyperv.c | 2 |
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); } |