Page MenuHomeFreeBSD

bhyve/pci_emul.c: Introduce device teardown routines
Needs ReviewPublic

Authored by bnovkov on Jan 11 2026, 1:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 12, 9:23 AM
Unknown Object (File)
Thu, Sep 10, 7:48 AM
Unknown Object (File)
Wed, Sep 9, 3:43 PM
Unknown Object (File)
Mon, Sep 7, 3:53 PM
Unknown Object (File)
Sun, Sep 6, 2:43 AM
Unknown Object (File)
Sat, Sep 5, 11:27 PM
Unknown Object (File)
Sat, Sep 5, 10:22 AM
Unknown Object (File)
Sat, Sep 5, 12:51 AM

Details

Reviewers
None
Group Reviewers
bhyve
Summary

This change introduces a teardown method to struct pci_devemu
(pe_teardown) along with the high-level pci_emul_teardown routine.
pe_teardown is responsible releasing any resources allocated in
pe_init, while pci_emul_teardown unregisters and releases all
device BARs into the appropriate vmem_t arena.

This is a prerequisite for PCI device hotplugging since it allows
us to release a device's resources upon ejecting it.

Diff Detail

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