STRUCT MSHV_CREATE_PARTITION_V2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to MSHV_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 is pt_rsvd2 instead) 🧚

πŸ’– 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_fbanks and pt_disabled_xsave are 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