diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2018-02-15 05:35:37 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2018-02-15 05:35:37 +0000 |
commit | 47efb5b34d445946bef24c2d3ca07f28e95dc3e0 (patch) | |
tree | 453b8874e0f2894c72c2c21c056ef732ccca28c6 | |
parent | 3cdadd12b211da5181365dd778be94dfb79d235a (diff) |
vmd(8): Properly return the correct byte when doing byte-aligned PCI
config space reads.
ok kettenis@, ccardenas@
-rw-r--r-- | usr.sbin/vmd/pci.c | 4 |
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; } } |