drivers/hv/hv_balloon.c
Source file repositories/reference/linux-study-clean/drivers/hv/hv_balloon.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hv/hv_balloon.c- Extension
.c- Size
- 55029 bytes
- Lines
- 2139
- Domain
- Driver Families
- Bucket
- drivers/hv
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cleanup.hlinux/kernel.hlinux/jiffies.hlinux/mman.hlinux/debugfs.hlinux/delay.hlinux/init.hlinux/module.hlinux/slab.hlinux/kthread.hlinux/completion.hlinux/count_zeros.hlinux/memory_hotplug.hlinux/memory.hlinux/notifier.hlinux/percpu_counter.hlinux/page_reporting.hlinux/sizes.hlinux/hyperv.hhyperv/hvhdk.hasm/mshyperv.hhv_trace_balloon.h
Detected Declarations
struct dm_headerstruct dm_messagestruct dm_version_requeststruct dm_version_responsestruct dm_capabilitiesstruct dm_capabilities_resp_msgstruct dm_statusstruct dm_balloonstruct dm_balloon_responsestruct dm_unballoon_requeststruct dm_unballoon_responsestruct dm_hot_addstruct dm_hot_add_responsestruct dm_info_headerstruct dm_info_msgstruct hv_hotadd_statestruct hv_hotadd_gapstruct balloon_statestruct hot_add_wrkstruct hv_dynmem_deviceenum dm_message_typeenum dm_info_typeenum hv_dm_statefunction has_pfn_is_backedfunction hv_page_offline_checkfunction list_for_each_entryfunction hv_memory_notifierfunction scoped_guardfunction hv_page_online_onefunction hv_bring_pgs_onlinefunction hv_mem_hot_addfunction scoped_guardfunction scoped_guardfunction hv_online_pagefunction scoped_guardfunction pfn_coveredfunction handle_pg_rangefunction process_hot_addfunction scoped_guardfunction hot_add_reqfunction process_infofunction compute_balloon_floorfunction get_pages_committedfunction post_statusfunction free_balloon_pagesfunction alloc_balloon_pagesfunction balloon_upfunction balloon_down
Annotated Snippet
module_init(init_balloon_drv);
MODULE_DESCRIPTION("Hyper-V Balloon");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/kernel.h`, `linux/jiffies.h`, `linux/mman.h`, `linux/debugfs.h`, `linux/delay.h`, `linux/init.h`, `linux/module.h`.
- Detected declarations: `struct dm_header`, `struct dm_message`, `struct dm_version_request`, `struct dm_version_response`, `struct dm_capabilities`, `struct dm_capabilities_resp_msg`, `struct dm_status`, `struct dm_balloon`, `struct dm_balloon_response`, `struct dm_unballoon_request`.
- Atlas domain: Driver Families / drivers/hv.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.