ne_get_cpu_from_cpu_pool(9)
π ne_get_cpu_from_cpu_pool(9) β the Kernel API Manual glow-up π
okay so bestie, welcome to the Kernel API Manual page for ne_get_cpu_from_cpu_pool β yes the name is a mouthful, yes it's iconic, no we are not shortening it π
β¨ NAME β¨
ne_get_cpu_from_cpu_pool β grab a CPU out of the NE CPU pool. and likeβ¦ from where exactly? two options, queen: either it's one of the remaining sibling(s) of a CPU core, or it's the first sibling of a new CPU core. that's the whole vibe check π¦
πΈ SYNOPSIS πΈ
int ne_get_cpu_from_cpu_pool (struct ne_enclave *ne_enclave , u32
*vcpu_id );
literally that's it. two args. slay β¨
π ARGUMENTS π
ne_enclaveβ the private data associated with the current enclave. it's giving "personal info, do not share" π«Άvcpu_idβ the vCPU that we're getting from the NE CPU pool. main character vCPU fr π
π¦ CONTEXT π¦
Process context, bestie. and listen β this function is called with the ne_enclave mutex held. so like, hold the lock, don't be weird about it π
β RETURN β
0on success π (we love a zero)- Negative return value on failure π (we do NOT love a negative, but it happens)
π SEE ALSO π
the whole friend group, no cap β every single one of these:
- Kernel file
./drivers/virt/nitro_enclaves/ne_misc_dev.cEnclave lifetime management driver for Nitro Enclaves (NE).(9) NE_CPUS_SIZE(9)NE_EIF_LOAD_OFFSET(9)NE_MIN_ENCLAVE_MEM_SIZE(9)NE_MIN_MEM_REGION_SIZE(9)NE_PARENT_VM_CID(9)struct ne_cpu_pool(9)struct ne_phys_contig_mem_regions(9)ne_check_enclaves_created(9)ne_setup_cpu_pool(9)ne_teardown_cpu_pool(9)ne_set_kernel_param(9)ne_donated_cpu(9)ne_get_unused_core_from_cpu_pool(9)ne_set_enclave_threads_per_core(9)ne_get_vcpu_core_from_cpu_pool(9)ne_check_cpu_in_cpu_pool(9)ne_add_vcpu_ioctl(9)ne_sanity_check_user_mem_region(9)ne_sanity_check_user_mem_region_page(9)ne_sanity_check_phys_mem_region(9)ne_merge_phys_contig_memory_regions(9)ne_set_user_memory_region_ioctl(9)ne_start_enclave_ioctl(9)ne_enclave_ioctl(9)ne_enclave_remove_all_mem_region_entries(9)ne_enclave_remove_all_vcpu_id_entries(9)ne_pci_dev_remove_enclave_entry(9)ne_enclave_release(9)ne_enclave_poll(9)ne_create_vm_ioctl(9)ne_ioctl(9)
like, read them. all of them. iykyk π₯
and that's the page, bestie π§π this lil masterpiece lives under ./drivers/virt/nitro_enclaves and it's stamped October 2026 β frame it, hang it up, periodt π
πΈ
π¦ 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