aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2022-01-04 19:02:55 +0000
committerMark Johnston <markj@FreeBSD.org>2022-01-05 15:12:09 +0000
commit76b45e688ae84a701f52039c4d0abf8e21a3f59c (patch)
tree2a616b802dff62d455fcdbea33b5c2090694f335 /usr.sbin
parent459e0b92e8aef0048e19a306c4626ed72356a3d0 (diff)
downloadsrc-76b45e688ae84a701f52039c4d0abf8e21a3f59c.tar.gz
src-76b45e688ae84a701f52039c4d0abf8e21a3f59c.zip
bhyve: Map the right BAR in init_msix_table()
The PBA and MSI-X table can reside in different BARs. Reported by: Andy Fiddaman <andy@omniosce.org> Reviewed by: jhb Fixes: 7fa233534736 ("bhyve: Map the MSI-X table unconditionally for passthrough") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33739
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/pci_passthru.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index ea8a3a71c8b8..0d25a8d8143f 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -444,7 +444,7 @@ init_msix_table(struct vmctx *ctx, struct passthru_softc *sc)
memset(&pbm, 0, sizeof(pbm));
pbm.pbm_sel = sc->psc_sel;
pbm.pbm_flags = PCIIO_BAR_MMAP_RW;
- pbm.pbm_reg = PCIR_BAR(pi->pi_msix.pba_bar);
+ pbm.pbm_reg = PCIR_BAR(pi->pi_msix.table_bar);
pbm.pbm_memattr = VM_MEMATTR_DEVICE;
if (ioctl(pcifd, PCIOCBARMMAP, &pbm) != 0) {