vmbus_allocate_mmio(9)
π vmbus_allocate_mmio(9)
okay so bestie, this is a page from the Kernel API Manual and it's all about vmbus_allocate_mmio β Pick a memory-mapped I/O range. yep that's literally the whole vibe. it's the function that goes "here, have an MMIO window, slay" π
β¨ SYNOPSIS β¨
int vmbus_allocate_mmio (struct resource **new , struct hv_device
*device_obj , resource_size_t min , resource_size_t max ,
resource_size_t size , resource_size_t align , bool fb_overlap_ok );
it returns an int, and yes the whole thing is one long signature so hydrate before reading it π§
πΈ ARGUMENTS πΈ
newβ if it works out, you get a pointer to the allocated MMIO space dropped in here. a little gift πdevice_objβ this is how the caller identifies itself. like showing your student ID at the door nglminβ minimum guest physical address of the allocationmaxβ maximum guest physical addresssizeβ size of the range to be allocatedalignβ alignment of the range to be allocatedfb_overlap_okβ whether this allocation can be allowed to overlap the video frame buffer. yes the frame buffer, the whole "your screen" situation π
π¦ DESCRIPTION π¦
so the way this works: the function walks the resources granted to VMBus by the _CRS object in the ACPI namespace, underneath the parent "bridge" β whether that's a root PCI bus in the Generation 1 case, or a Module Device in the Generation 2 case. two eras, same energy β¨
then it attempts to allocate from the global MMIO pool in a way that matches the constraints supplied in these parameters and by that _CRS. so like, the parameters say what you want, and _CRS says what's actually allowed. compromise, communication, it's giving healthy relationship π
π RETURN π
0 on success, -errno on failure. no cap, that's it.
π₯ SEE ALSO π₯
- Kernel file
./drivers/hv/vmbus_drv.c __vmbus_driver_register(9)vmbus_driver_unregister(9)hv_create_ring_sysfs(9)hv_remove_ring_sysfs(9)vmbus_free_mmio(9)
all the sibling functions, the whole friendgroup fr fr π«Ά
anyway that's the tea β this page lives in ./drivers/hv and it's dated October 2026, so mark your calendars bestie π
β¨
π¦ 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