STRUCT MSHV_USER_MEM_REGION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mshv_user_mem_region(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct mshv_user_mem_region, and it's literally giving arguments for MSHV_SET_GUEST_MEMORY energy. 🫢


πŸŽ€ NAME πŸŽ€

struct mshv_user_mem_region β€” arguments for MSHV_SET_GUEST_MEMORY. that's the name, that's the assignment, periodt. πŸ’…

✨ SYNOPSIS ✨

struct mshv_user_mem_region {
    __u64 size;
    __u64 guest_pfn;
    __u64 userspace_addr;
    __u8 flags;
    __u8 rsvd[7];
 };

🌸 Members 🌸

  • size β€” size of the memory region, in bytes. Must be aligned to MSHV_HV_PAGE_SIZE.
  • guest_pfn β€” base guest page number to map.
  • userspace_addr β€” base address of userspace memory. Must be aligned to MSHV_HV_PAGE_SIZE.
  • flags β€” bitmask of 1 << MSHV_SET_MEM_BIT_*. If (1 << MSHV_SET_MEM_BIT_UNMAP) is set, ignore other bits. πŸ‘€
  • rsvd β€” MBZ. that's the whole entry, bestie.

πŸ¦‹ Description πŸ¦‹

Map or unmap a region of userspace memory to Guest Physical Addresses (GPA). Mappings can't overlap in GPA space β€” no cap, that's the rule. 🚫

To unmap, these fields must match an existing mapping. like, they have to line up with something that's already there. βœ…

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/uapi/linux/mshv.h β€” go read it, bestie:

  • struct mshv_create_partition(9)
  • struct mshv_create_partition_v2(9)
  • struct mshv_gpap_access_bitmap(9)
  • struct mshv_root_hvcall(9)
  • struct mshv_run_vp(9)
  • struct mshv_get_set_vp_state(9)

mwah πŸ’‹ this page's source/version stamp is ./include/uapi/linux, dated October 2026, and the page itself is struct mshv_user_mem_region(9). byeee, go map some memory responsibly πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from