STRUCT VM_MEMORY_REGION_BATCH(9)
π struct vm_memory_region_batch(9) β kernel API manual, bestie edition
okay so real talk, this is a page from the Kernel API Manual, and the star of the show is struct vm_memory_region_batch π like yes the header is literally truncated to struct vm_m...region_batch(9) (iconic abbreviation energy, slay) but we all know what it is.
β¨ NAME β¨
struct vm_memory_region_batch β literally just a batch of vm_memory_region_op. that's it. that's the whole vibe check. π
πΈ SYNOPSIS πΈ
struct vm_memory_region_batch {
u16 vmid;
u16 reserved[3];
u32 regions_num;
u64 regions_gpa;
struct vm_memory_region_op regions_op[];
};
copy it exactly bestie, character for character, don't you dare touch a single u16 π
π¦ Members π¦
so like, here's the roster of everyone in the struct, main character energy for each and every one:
vmidβ a User VM ID. it's giving "which VM is this for" π«Άreservedβ Reserved. that's it, that's the whole description. she's reserved, she's mysterious, leave her alone πregions_numβ The number ofvm_memory_region_op. the headcount, the guest list, lowkey the most important number in the function β¨regions_gpaβ Physical address of avm_memory_region_oparray. yes physical, not virtual, don't come for me πregions_opβ Flexible array ofvm_memory_region_op. flexible literally in the C sense, she grows at the end of the struct, we love a tail array π
π Description π
okay so here's the tea β β HC_VM_SET_MEMORY_REGIONS uses this structure to manage EPT mappings of multiple memory regions of a User VM. like, that's the whole job.
a struct vm_memory_region_batch contains multiple struct vm_memory_region_op for batch processing in the ACRN Hypervisor. so instead of doing the whole little-one-at-a-time thing, you batch them, and the hypervisor eats it up. efficiency! ate and left no crumbs π₯
π SEE ALSO π
go read these next, i'm obsessed with all of them fr fr:
- Kernel file
./drivers/virt/acrn/acrn_drv.h struct vm_memory_region_op(9)struct vm_memory_mapping(9)struct acrn_ioreq_buffer(9)struct acrn_ioreq_client(9)struct acrn_vm(9)
ngl bestie, if you're reading this struct in a debugger and regions_num doesn't match what you think it should, that's a you problem and a very real one π check it before you ship.
and that's the page!! mwah π«Ά this whole thing lives over in ./drivers/virt/acrn, the date on it is October 2026, and the title bar's truncated little nickname for her is struct vm_m...region_batch(9) β she's got a long name and honestly she deserves the cute abbreviation. 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