Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/bhyve/pci_passthru.c
Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Lines | for (i = 0; i <= PCI_BARMAX; i++) { | ||||
} | } | ||||
/* Cache information about the "real" BAR */ | /* Cache information about the "real" BAR */ | ||||
sc->psc_bar[i].type = bartype; | sc->psc_bar[i].type = bartype; | ||||
sc->psc_bar[i].size = size; | sc->psc_bar[i].size = size; | ||||
sc->psc_bar[i].addr = base; | sc->psc_bar[i].addr = base; | ||||
/* Allocate the BAR in the guest I/O or MMIO space */ | /* Allocate the BAR in the guest I/O or MMIO space */ | ||||
error = pci_emul_alloc_pbar(pi, i, base, bartype, size); | error = pci_emul_alloc_bar(pi, i, bartype, size); | ||||
if (error) | if (error) | ||||
return (-1); | return (-1); | ||||
/* The MSI-X table needs special handling */ | /* The MSI-X table needs special handling */ | ||||
if (i == pci_msix_table_bar(pi)) { | if (i == pci_msix_table_bar(pi)) { | ||||
error = init_msix_table(ctx, sc, base); | error = init_msix_table(ctx, sc, base); | ||||
if (error) | if (error) | ||||
return (-1); | return (-1); | ||||
▲ Show 20 Lines • Show All 366 Lines • Show Last 20 Lines |