ne_create_vm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ne_create_vm(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, welcome to ne_create_vm from the Kernel API Manual ✨ this one is literally the first step β€” it makes a slot for the enclave VM, like reserving the cutest table at the restaurant before anyone even shows up 🫢


🌸 NAME 🌸

ne_create_vm β€” create a slot for the enclave VM πŸ’–

yes that's it. that's the whole vibe. slot = created, enclave VM = has a home. slay.


✨ SYNOPSIS ✨

int ne_create_vm (int ne_dev_fd , unsigned long *slot_uid , int *enclave_fd );

three args, one int coming back at you. no cap. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ne_dev_fd β€” the file descriptor of the NE misc device. like, the NE misc device's fd. that's the one πŸŽ€
  • slot_uid β€” the generated slot uid for the enclave 🌟 it gets generated and you get it back through this pointer, iykyk
  • enclave_fd β€” the generated file descriptor for the enclave 🧚 also generated, also handed back to you via pointer

πŸ’œ CONTEXT πŸ’œ

Process context. that's the whole section, she's short and she knows it πŸ’…


πŸ”₯ RETURN πŸ”₯

  • 0 on success ✨ we LOVE a zero
  • Negative return value on failure 😭 not zero, not happy. negative. handle it fr fr

🌈 SEE ALSO 🌈

okay this list is long and honestly iconic, so buckle up bestie:

  • Kernel file ./samples/nitro_enclaves/ne_ioctl_sample.c β€” Sample flow of using the ioctl interface provided by the Nitro Enclaves (NE)(9) πŸ“„
  • NE_DEV_NAME(9)
  • NE_POLL_WAIT_TIME(9)
  • NE_POLL_WAIT_TIME_MS(9)
  • NE_SLEEP_TIME(9)
  • NE_DEFAULT_NR_VCPUS(9)
  • NE_MIN_MEM_REGION_SIZE(9)
  • NE_DEFAULT_NR_MEM_REGIONS(9)
  • NE_IMAGE_LOAD_HEARTBEAT_CID(9)
  • NE_IMAGE_LOAD_HEARTBEAT_PORT(9)
  • NE_IMAGE_LOAD_HEARTBEAT_VALUE(9)
  • struct ne_user_mem_region(9)
  • ne_poll_enclave_fd(9)
  • ne_alloc_user_mem_region(9)
  • ne_load_enclave_image(9)
  • ne_set_user_mem_region(9)
  • ne_free_mem_regions(9)
  • ne_add_vcpu(9)
  • ne_start_enclave(9)
  • ne_start_enclave_check_booted(9)

like?? the whole friend group showed up to the function's birthday party πŸŽ‚ obsessed.


ngl the safest move is to actually read that sample file before you start calling ioctls, bestie β€” it's literally the sample flow 🫢

and that's the page!! πŸ’– this lil beauty comes from ./samples/nitro_enclaves and is dated October 2026, so go forth and create those VM slots, main character πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from