STRUCT MSHV_CREATE_PARTITION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mshv_create_partition(9) πŸ’…

okay bestie so we're in the Kernel API Manual today, and this page is literally about struct mshv_create_partition β€” yes it's a struct, yes it's got two __u64 fields, yes we're gonna get through it together 🫢


✨ NAME ✨

struct mshv_create_partition β€” the arguments you hand over for MSHV_CREATE_PARTITION, no cap πŸ’«


πŸŽ€ SYNOPSIS πŸŽ€

struct mshv_create_partition {
    __u64 pt_flags;
    __u64 pt_isolation;
 };

look at her. two fields. flawless. iconic. πŸ’…


🌸 Members 🌸

  • pt_flags β€” a bitmask of 1 << MSHV_PT_BIT_* ✨ (it's giving "pick your bits, bestie")
  • pt_isolation β€” an MSHV_PT_ISOLATION_* value πŸ’–

πŸ¦‹ Description πŸ¦‹

okay so this is the initial/v1 version, kept around purely for backward compatibility πŸ”₯ β€” like that one friend who's still on the old group chat and honestly? we respect her.

It returns a file descriptor that acts as a handle to a guest partition πŸ’«. and here's the thing β€” at this point the partition isn't initialized in the hypervisor yet. she's just vibing. not yet setup. 🌈

Some operations must be done while she's in this state, for example setting the so-called "early" partition properties 🌸 (yes, early. get there before everyone else. main character energy πŸ‘‘).

After that, the partition can then be initialized with MSHV_INITIALIZE_PARTITION ⭐

πŸ’€ reminder for the girlies: not initialized yet β‰  ready to go. do the early stuff first, then initialize. periodt.

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./include/uapi/linux/mshv.h πŸ“
  • 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)
  • struct mshv_get_set_vp_state(9)

iykyk β€” go read all of them, bestie, they're all in the family 🧚


and that's the page!! brought to you by ./include/uapi/linux, October 2026 πŸ“…βœ¨ mwah, love u, go init that partition responsibly πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from