ne_add_vcpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 is 0). so real talk: you can hand it an id, OR you can pass in 0 and it just auto-generates one for you. the 0 is 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 ⭐

  • 0 on 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 πŸ”₯


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