ne_add_vcpu(9)
β¨ ne_add_vcpu(9) β¨
okay so this is a page from the Kernel API Manual (section 9, kernel-space vibes only, bestie π
) and it's literally about adding a vCPU to an enclave. yes THAT kind of party. let's get into it π
πΈ NAME πΈ
ne_add_vcpu β Add a vCPU to the given enclave. that's it, that's the whole gig. iconic honestly π
π¦ SYNOPSIS π¦
int ne_add_vcpu (int enclave_fd , unsigned int *vcpu_id );
look at that signature, so clean, so main character β¨
π ARGUMENTS π
enclave_fdβ The file descriptor associated with the enclave. like, the fd that says "yes hi this is the enclave I'm talking about" π«Άvcpu_idβ vCPU id to be set for the enclave, either provided or auto-generated (if provided vCPU id is0). so real talk: you can hand it an id, OR you can pass in0and it just auto-generates one for you. the0is the "surprise me" option fr fr π
π§ CONTEXT π§
Process context. (translation: you're running this from a normal process, not in some interrupt-y chaos dimension, iykyk)
β RETURN β
0on success. slay. we love a clean zero π- Negative return value on failure. not slay, but at least it tells you π
no cap, check that return value. negative means something went sideways, don't just ignore it π
π₯ SEE ALSO π₯
- Kernel file
./samples/nitro_enclaves/ne_ioctl_sample.cβ Sample flow of using the ioctl interface provided by the Nitro Enclaves (NE)(9). genuinely go read this one, it shows you the whole flow π«Ά 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_create_vm(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_start_enclave(9)ne_start_enclave_check_booted(9)
that's the whole page bestie, go forth and add your vCPUs π
sign-off szn: this lil beauty comes from ./samples/nitro_enclaves, dated October 2026, and it's ne_add_vcpu(9) all day every day πβ¨
π¦ 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