summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vmd/pci.c
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2018-02-15 05:35:36 +0000
committermlarkin <mlarkin@openbsd.org>2018-02-15 05:35:36 +0000
commitda415f8a443af1ead863b0e8b56814e162f7ea59 (patch)
tree9e27a5dadc159cbe46e3671e8dd8d09144101c20 /usr.sbin/vmd/pci.c
parentupdate tunnelttl to talk about the "copy" argument (diff)
downloadwireguard-openbsd-da415f8a443af1ead863b0e8b56814e162f7ea59.tar.xz
wireguard-openbsd-da415f8a443af1ead863b0e8b56814e162f7ea59.zip
vmd(8): Properly return the correct byte when doing byte-aligned PCI
config space reads. ok kettenis@, ccardenas@
Diffstat (limited to 'usr.sbin/vmd/pci.c')
-rw-r--r--usr.sbin/vmd/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/vmd/pci.c b/usr.sbin/vmd/pci.c
index 9ea3763ec65..8abd5c3c304 100644
--- a/usr.sbin/vmd/pci.c
+++ b/usr.sbin/vmd/pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.c,v 1.22 2017/09/17 23:07:56 pd Exp $ */
+/* $OpenBSD: pci.c,v 1.23 2018/02/15 05:35:36 mlarkin Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -404,7 +404,7 @@ pci_handle_data_reg(struct vm_run_params *vrp)
break;
case 1:
set_return_data(vei,
- pci.pci_devices[d].pd_cfg_space[o / 4] >> (ofs * 3));
+ pci.pci_devices[d].pd_cfg_space[o / 4] >> (ofs * 8));
break;
}
}