The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=76b45e688ae84a701f52039c4d0abf8e21a3f59c

commit 76b45e688ae84a701f52039c4d0abf8e21a3f59c
Author:     Mark Johnston <ma...@freebsd.org>
AuthorDate: 2022-01-04 19:02:55 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2022-01-05 15:12:09 +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 <a...@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
---
 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 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) {

Reply via email to