diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -87,9 +87,16 @@ struct pci_irq ii_irq; }; +enum slottype { + PCI_SLOT_HP_EMPTY, + PCI_SLOT_HP_ACTIVE, + PCI_SLOT_FIXED, +}; + struct slotinfo { struct intxinfo si_intpins[4]; struct funcinfo si_funcs[MAXFUNCS]; + enum slottype si_type; }; struct businfo { @@ -1592,6 +1599,7 @@ /* first run: init devices */ for (slot = 0; slot < MAXSLOTS; slot++) { si = &bi->slotinfo[slot]; + si->si_type = PCI_SLOT_HP_EMPTY; for (func = 0; func < MAXFUNCS; func++) { fi = &si->si_funcs[func]; snprintf(node_name, sizeof(node_name), @@ -1626,6 +1634,7 @@ func, fi); if (error) return (error); + si->si_type = PCI_SLOT_FIXED; } }