STRUCT MSHV_GET_SET_VP_STATE(9)
π struct mshv_get_set_vp_state(9) π
okay so this is a page from the Kernel API Manual, bestie, and it's about a little struct that carries the arguments for MSHV_[GET,SET]_VP_STATE β yes that bracket notation is doing the most but it's iconic, we love a two-for-one π₯
β¨ NAME β¨
struct mshv_get_set_vp_state β literally the arguments struct for MSHV_[GET,SET]_VP_STATE, no cap π«Ά
πΈ SYNOPSIS πΈ
struct mshv_get_set_vp_state {
__u8 type;
__u8 rsvd[3];
__u32 buf_sz;
__u64 buf_ptr;
};
that's the whole vibe. four fields. immaculate. β¨
π MEMBERS π
typeβ it'sMSHV_VP_STATE_*, like pick your state icon, main character energy only πrsvdβMBZbestie. Must Be Zero. don't be quirky with this one, leave it at zero fr fr πbuf_szβ okay this one is doing double duty and it's giving overachiever:- in: the 4k page-aligned size of the buffer π¦
- out: the actual size of the data
- and like, ngl, if you get an
EINVAL, check this field to see if your buffer was too small π she'll tell you
buf_ptrβ the data buffer, and yes it's 4k page-aligned too. alignment is the dress code, no exceptions π β
lowkey the recurring theme here is 4k page alignment β bothbuf_sz(the in value) andbuf_ptrgotta be aligned. that's just the house rules π
π¦ SEE ALSO π¦
Kernel file ./include/uapi/linux/mshv.h and this whole friend group:
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_root_hvcall(9)struct mshv_run_vp(9)
go read them all, i'll wait π (jk, read them at your own pace, you're doing amazing sweetie π§)
π okay that's the whole page!! this icon lives in ./include/uapi/linux and the date on this masterpiece is October 2026 β hope that helps bestie, slay your hypervisor adventures, and remember: aligned buffers, zeroed rsvd, 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