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
F158038280: D54647.diff
Wed, May 27, 7:27 PM
Unknown Object (File)
Thu, May 14, 4:44 PM
Unknown Object (File)
Thu, May 14, 9:43 AM
Unknown Object (File)
Thu, May 14, 6:34 AM
Unknown Object (File)
Thu, May 14, 1:00 AM
Unknown Object (File)
Wed, May 13, 9:40 PM
Unknown Object (File)
Mon, May 11, 5:17 AM
Unknown Object (File)
Mon, May 11, 5:17 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