Page MenuHomeFreeBSD

bhyve: Refactor initial PCI BAR setup
Needs ReviewPublic

Authored by jhb on Mon, Aug 17, 5:55 PM.

Details

Reviewers
bnovkov
Group Reviewers
bhyve
Summary

Fully initialize BARs with an address of 0 in pci_emul_alloc_bar()
instead of deferring some of that initialization to
pci_emul_assign_bar(). Now, the latter is only used to allocate an
initial address range for PCI BARs.

Note that this means that the pci_passthru model now overrides the
initial lobits after they are set removing the need for a workaround
in pci_emul_assign_bar().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75653
Build 72536: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Mon, Aug 17, 5:55 PM
jhb added inline comments.
usr.sbin/bhyve/pci_emul.c
869

@bnovkov I think once this change is in place, all you would need to do here for the HotPlug case is return here before adding the BAR to the linked list or enabling decoding in the command register.