ne_create_vm(9)
π 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, iykykenclave_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 π₯
0on 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
- 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