STRUCT MSHV_CREATE_PARTITION_V2(9)
π
struct mshv_create_partition_v2(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β yes it's a real manual, yes it's about a struct, and yes we're gonna get through it together. This one's struct mshv_create_partition_v2, and she's basically the glow-up edition of the partition-creation struct. Let's go π
β¨ NAME β¨
struct mshv_create_partition_v2 β and that's it. That's the whole description. Literally just a dash in the original. No cap, the manpage author said "she speaks for herself" π. Iconic behaviour honestly.
πΈ SYNOPSIS πΈ
struct mshv_create_partition_v2 {
__u64 pt_flags;
__u64 pt_isolation;
__u16 pt_num_cpu_fbanks;
__u8 pt_rsvd[6];
__u64 pt_cpu_fbanks[MSHV_NUM_CPU_FEATURES_BANKS];
__u64 pt_rsvd1[2];
#if defined(__x86_64__);
__u64 pt_disabled_xsave;
#else;
__u64 pt_rsvd2;
#endif;
};
look at her. gorgeous. the #if defined(__x86_64__); situation is doing a whole little x86-vs-everyone-else moment, and yes those semicolons really are there in the source, we do not touch them, we respect them π«Ά
π¦ Members π¦
pt_num_cpu_fbanksβ bestie this one is not freestyle-able, okay? It must be set toMSHV_NUM_CPU_FEATURES_BANKS. Not a suggestion. Not a vibe. A requirement πpt_cpu_fbanksβ the array of disabled processor feature banks. this is where you tell the kernel which CPU features you're saying "no thank you" to πpt_disabled_xsaveβ and here's where the disabled xsave feature bits go. only exists on the__x86_64__branch, so if you're not on x86_64 she's literally not invited (that slot ispt_rsvd2instead) π§
π Description π
okay so, the actual tea β: this struct is the extended version of the above initial MSHV_CREATE_PARTITION ioctl β think of the original as the base model and this one as the one with all the upgrade options unlocked β¨
Being the extended version means she allows for the following additional parameters:
pt_cpu_fbanksandpt_disabled_xsaveare both passed through as-is to the create partition hypercall. no processing, no remixing, no "let me just tidy that up for you" β straight through, unchanged, main character energy π
β Return β
same as above original mshv_create_partition β yeah, she's not reinventing the return-value situation, she's just the v2 with extra fields. lowkey refreshing honestly π
π₯ SEE ALSO π₯
- Kernel file
./include/uapi/linux/mshv.h struct mshv_create_partition(9)struct mshv_user_mem_region(9)struct mshv_gpap_access_bitmap(9)struct mshv_root_hvcall(9)struct mshv_run_vp(9)struct mshv_get_set_vp_state(9)
the whole mshv friend group honestly, they all show up together π«Άβ¨
aaaand that's the page!! π this little beauty lives in ./include/uapi/linux, dated October 2026, and yes she really does sign her name at the bottom like a pop star β struct mshv...partition_v2(9), mwah ππ
π¦ 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