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