ne_donated_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ne_donated_cpu(9) β€” a Kernel API Manual moment

Okay bestie, so this whole page is about ne_donated_cpu(9) β€” yes, that's the manual section 9, kernel API vibes only β€” and it's literally just one little function that answers a very specific question: is this CPU already being used by the enclave or not? That's it. That's the whole gig. And honestly? Iconic. πŸŽ€


🌸 NAME 🌸

ne_donated_cpu β€” check if the provided CPU is already used by the enclave.

Like, it's a vibe check for CPUs. Is this core taken? Yes or no. Go. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

bool ne_donated_cpu (struct ne_enclave *ne_enclave , unsigned int cpu );

No cap, that's the whole signature. It returns a bool and takes two things. We'll get into them right now. πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • ne_enclave β€” the private data associated with the current enclave. Basically the enclave's little personal diary of state, and you're handing over the pointer to it. 🫢
  • cpu β€” the CPU you want to check, i.e. the one you're asking "hey, are you already used?" about.

✨ CONTEXT ✨

Process context, bestie. And listen β€” this function is called with the ne_enclave mutex held. So like, don't go calling it wherever, the mutex has to already be in your hands. That's the whole rule. πŸ”’


πŸ”₯ RETURN πŸ”₯

  • True if the provided CPU is already used by the enclave.
  • False otherwise.

Two outcomes. Binary. Main character energy. βœ…βŒ


🌈 SEE ALSO 🌈

Buckle up, because this list is long and we're keeping every single one, no skipping, fr fr. πŸ’€


Okay so real talk: this function is only meaningful in process context and while holding the ne_enclave mutex. Not optional, bestie. Don't come for me if you skip that. πŸ™ˆ

And that's the page! 🧚 This little love letter lives over at ./drivers/virt/nitro_enclaves, dated October 2026 β€” go check the source if you want the full lore, iykyk. Byeee πŸ’œπŸ¦‹

πŸ“¦ where this page comes from