From da415f8a443af1ead863b0e8b56814e162f7ea59 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Thu, 15 Feb 2018 05:35:36 +0000 Subject: [PATCH] vmd(8): Properly return the correct byte when doing byte-aligned PCI config space reads. ok kettenis@, ccardenas@ --- usr.sbin/vmd/pci.c | 4 ++-- 1 file 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 @@ -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; } } -- 2.20.1