STRUCT NE_ENCLAVE(9)
π¦ struct ne_enclave π¦
okay bestie, this is the struct ne_enclave page from the Kernel API Manual (section 9), and itβs literally the per-enclave data used for enclave lifetime management. no cap, weβre doing a full member-by-member roll call, and every single member is below β no skips, no βoops I forgot oneβ energy π
β¨
π NAME π
struct ne_enclave β per-enclave data used for enclave lifetime management.
β¨ SYNOPSIS β¨
struct ne_enclave {
struct mutex enclave_info_mutex;
struct list_head enclave_list_entry;
wait_queue_head_t eventq;
bool has_event;
u64 max_mem_regions;
struct list_head mem_regions_list;
u64 mem_size;
struct mm_struct *mm;
unsigned int nr_mem_regions;
unsigned int nr_parent_vm_cores;
unsigned int nr_threads_per_core;
unsigned int nr_vcpus;
int numa_node;
u64 slot_uid;
u16 state;
cpumask_var_t *threads_per_core;
cpumask_var_t vcpu_ids;
};
π Members π
enclave_info_mutexβ the mutex for accessing this internal state. itβs the gatekeeper for the structβs own info πenclave_list_entryβ entry in the list of created enclaves. itβs the link that hooks this enclave into the created-enclaves lineup.eventqβ wait queue used for out-of-band event notifications triggered from thePCIdevice event handler to the enclave process via thepollfunction. this is the βhey bestie, an out-of-band event happenedβ queue.has_eventβ variable used to determine if the out-of-band event was triggered. a tiny βdid it happen?β flag.max_mem_regionsβ the maximum number of memory regions that can be handled by the hypervisor. thatβs the cap, periodt.mem_regions_listβ enclave user space memory regions list. all the enclave user space memory regions are chillinβ in this list π«Άmem_sizeβ enclave memory size. the size of the enclave memory, literally.mmβ enclave process abstractionmmdata struct. themmdata struct for the enclave process abstraction, iykyk.nr_mem_regionsβ number of memory regions associated with the enclave. how many memory regions are tied to this enclave π’nr_parent_vm_coresβ the size of the threads per core array. the total number of CPU cores available on the parent / primary VM. two facts, both iconic: itβs the size of the threads per core array and the total number of CPU cores available on the parent / primary VM.nr_threads_per_coreβ the number of threads that a full CPU core has. how many threads one full CPU core has π§΅nr_vcpusβ number of vcpus associated with the enclave. the enclaveβs vCPU count.numa_nodeβ NUMA node of the enclave memory and CPUs. location, location, location for the enclave memory and CPUs.slot_uidβ slot unique id mapped to the enclave. the unique slot id mapped to this enclave ποΈstateβ enclave state, updated during enclave lifetime. the state field gets updated during the enclave lifetime, main character energy.threads_per_coreβ enclave full CPU cores array, indexed by core id, consisting of cpumasks with all their threads. full CPU cores are taken from theNE CPU pooland are available to the enclave. this one is a whole situation: the enclave full CPU cores array, indexed by core id, consisting of cpumasks with all their threads; full CPU cores come from theNE CPU pooland are available to the enclave.vcpu_idsβ cpumask of the vCPUs that are set for the enclave. the vCPU id cpumask for the vCPUs set for the enclave.
π SEE ALSO π
- Kernel file
./drivers/virt/nitro_enclaves/ne_misc_dev.h struct ne_mem_region(9)enum ne_state(9)struct ne_devs(9)
sending you kissies from ./drivers/virt/nitro_enclaves β this page is dated October 2026 and itβs struct ne_enclave(9), bestie. bye bestie, slay ππ«Ά
π¦ 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