STRUCT MSHV_ROOT_HVCALL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct mshv_root_hvcall(9) ✨

okay bestie, welcome to the Kernel API Manual β€” this is the mshv_root_hvcall struct, and no cap, it's literally the little argument bundle you hand to MSHV_ROOT_HVCALL. it's giving "permission slip for hypercalls" energy πŸŽ€


πŸ’– NAME πŸ’–

struct mshv_root_hvcall β€” literally just the args for MSHV_ROOT_HVCALL, that's it, that's the whole vibe 🫢


🌸 SYNOPSIS 🌸

struct mshv_root_hvcall {
    __u16 code;
    __u16 reps;
    __u16 in_sz;
    __u16 out_sz;
    __u16 status;
    __u8 rsvd[6];
    __u64 in_ptr;
    __u64 out_ptr;
 };

look at her. iconic. she's not even that big πŸ’…


πŸ¦‹ Members πŸ¦‹

okay so here's the field-by-field breakdown, iykyk:

  • code β€” the hypercall code, and it's one of the HVCALL_* ones. that's the whole field. pick your fighter ⭐
  • reps β€” rep count things! in: it's the rep count (aka 'repcount'). out: it's the reps that actually completed (aka 'repcomp'). it must be zero (MBZ) unless this is a rep hvcall, so don't be weird about it πŸ™ˆ
  • in_sz β€” the size of the input, and yes that includes the rep data. has to be <= MSHV_HV_PAGE_SIZE. don't push it πŸ”₯
  • out_sz β€” the size of the output buffer. also <= MSHV_HV_PAGE_SIZE. and it must be zero (MBZ) if out_ptr is 0, so keep those two in sync bestie πŸ’€
  • status β€” in: must be zero (MBZ). out: you get an HV_STATUS_* back from the hypercall. ✨ the tea ✨
  • rsvd β€” must be zero (MBZ). it's reserved. don't touch. no notes πŸŽ€
  • in_ptr β€” your input data buffer (it's a struct hv_input_*). if you're using it with a partition or vp fd, the kernel populates the partition id field for you β€” she's helpful like that 🫢
  • out_ptr β€” the output data buffer, and it's optional, so you can absolutely skip her if you don't need her πŸ’œ

🌈 SEE ALSO 🌈

go read these next, fr fr β€” the kernel file ./include/uapi/linux/mshv.h plus:

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

and that's the whole page, bestie! she lives in ./include/uapi/linux, timestamped October 2026 β€” go forth and hypercall responsibly πŸ‘‘πŸ’–

πŸ“¦ where this page comes from