STRUCT NE_ENCLAVE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 the PCI device event handler to the enclave process via the poll function. 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 abstraction mm data struct. the mm data 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 the NE CPU pool and 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 the NE CPU pool and 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