git: fa3cc60e6dcc - stable/13 - bhyve: Map the right BAR in init_msix_table()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 08 Jan 2022 15:22:21 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3cc60e6dccbffd136ffbb804c2606c401e1443 commit fa3cc60e6dccbffd136ffbb804c2606c401e1443 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-01-04 19:02:55 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-01-08 15:22:08 +0000 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") Sponsored by: The FreeBSD Foundation (cherry picked from commit 76b45e688ae84a701f52039c4d0abf8e21a3f59c) --- usr.sbin/bhyve/pci_passthru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 313f73dc4df1..2e274829d783 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, uint64_t base) 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) {