bhyve: add bus, slot and func to device name
Each device needs a unique identifier to store and restore snapshots properly. Adding the pci bsf information to the device name creates a unique identifier as a bsf can't be occupied twice. Reviewed by: corvink MFC after: 1 week Sponsored by: vStack Differential Revision: https://reviews.freebsd.org/D40107
This commit is contained in:
committed by
Corvin Köhne
parent
b10d65a420
commit
14c80457b0
@@ -1029,7 +1029,8 @@ pci_emul_init(struct vmctx *ctx, struct pci_devemu *pde, int bus, int slot,
|
||||
pdi->pi_lintr.pirq_pin = 0;
|
||||
pdi->pi_lintr.ioapic_irq = 0;
|
||||
pdi->pi_d = pde;
|
||||
snprintf(pdi->pi_name, PI_NAMESZ, "%s-pci-%d", pde->pe_emu, slot);
|
||||
snprintf(pdi->pi_name, PI_NAMESZ, "%s@pci.%d.%d.%d", pde->pe_emu, bus,
|
||||
slot, func);
|
||||
|
||||
/* Disable legacy interrupts */
|
||||
pci_set_cfgdata8(pdi, PCIR_INTLINE, 255);
|
||||
|
||||
Reference in New Issue
Block a user