pci_devices_present_work(9)
okay bestie, welcome to pci_devices_present_work(9) from the Kernel API Manual β¨ this page is all about handling a new list of child devices, and it's giving very "Hyper-V bus relations but make it Linux" energy π
β¨ NAME β¨
pci_devices_present_work β handle new list of child devices π«Ά
πΈ SYNOPSIS πΈ
void pci_devices_present_work (struct work_struct *work );
π ARGUMENTS π
workβ the work struct embedded instruct hv_dr_work. That's the one you're handing over, bestie π.
π¦ DESCRIPTION π¦
So "Bus Relations" is the Windows term for "children of this bus." The terminology is preserved here for people trying to debug the interaction between Hyper-V and Linux β iykyk, it's a debugging bridge π«Ά.
This function gets called when the parent partition reports a list of functions that should be observed under this PCI Express port (bus). It updates the list, and it must tolerate being called multiple times with the same information. No cap: the typical number of child devices is one, with very atypical cases involving three or four, so the algorithms used here can be simple and inefficient. Honestly? slay, simple and inefficient is a whole vibe.
It must also treat the omission of a previously observed device as notification that the device no longer exists. So if a device ghosts the list, that's the signal it's gone π».
Note: this function is serialized withhv_eject_device_work, because both are pushed to the ordered workqueuehbus->wq. That's the ordered-workqueue tea β.
π SEE ALSO π
Kernel file ./drivers/pci/controller/pci-hyperv.c, plus these iconic references: struct hv_msi_desc(9), struct hv_msi_desc2(9), struct tran_int_desc(9), hv_irq_retarget_interrupt(9), hv_pci_generic_compl(9), devfn_to_wslot(9), wslot_to_devfn(9), _hv_pcifront_read_config(9), _hv_pcifront_write_config(9), hv_pcifront_read_config(9), hv_pcifront_write_config(9), hv_pci_read_config_compl(9), hv_read_config_block(9), hv_pci_write_config_compl(9), hv_write_config_block(9), hv_register_block_invalidate(9), hv_msi_free(9), hv_compose_msi_msg(9), hv_pcie_init_irq_domain(9), get_bar_size(9), survey_child_resources(9), prepopulate_bars(9), create_root_hv_pci_bus(9), q_resource_requirements(9), new_pcichild_device(9), get_pcichild_wslot(9), hv_pci_start_relations_work(9), hv_pci_devices_present(9), hv_pci_devices_present2(9), hv_eject_device_work(9), hv_pci_eject_device(9), hv_pci_onchannelcallback(9), hv_pci_protocol_negotiation(9), hv_pci_free_bridge_windows(9), hv_pci_allocate_bridge_windows(9), hv_allocate_config_window(9), hv_pci_enter_d0(9), hv_pci_query_relations(9), hv_send_resources_allocated(9), hv_send_resources_released(9), hv_pci_probe(9), hv_pci_remove(9).
π that's the whole page, bestie β source/version line: ./drivers/pci/controller, date: October 2026. periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms