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
This commit is contained in:
parent
459e0b92e8
commit
76b45e688a
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user