ENUM NE_PCI_DEV_CMD_TYPE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 enum ne_pci_dev_cmd_type β€” a Kernel API Manual moment πŸ’…

okay so bestie, we're looking at enum ne_pci_dev_cmd_type from the Kernel API Manual, and honestly? it's giving "backstage pass to how the Nitro Enclaves PCI device talks to the kernel." every single command type lives in here, so let's go through them one by one, no skips, no cap πŸŽ€


✨ NAME ✨

enum ne_pci_dev_cmd_type β€” the device command types. that's it, that's the whole vibe. every command the device can receive is chillin' in this one enum like a little roster πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

enum ne_pci_dev_cmd_type {
    INVALID_CMD ,
    ENCLAVE_START ,
    ENCLAVE_GET_SLOT ,
    ENCLAVE_STOP ,
    SLOT_ALLOC ,
    SLOT_FREE ,
    SLOT_ADD_MEM ,
    SLOT_ADD_VCPU ,
    SLOT_COUNT ,
    NEXT_SLOT ,
    SLOT_INFO ,
    SLOT_ADD_BULK_VCPUS ,
    MAX_CMD

};

lowkey a whole lineup, right? okay, now the lore behind each one 🌈


πŸ’– Constants πŸ’–

  • INVALID_CMD β€” the invalid command. it's the "this is not a real thing" entry, the placeholder of the group chat πŸ™ˆ
  • ENCLAVE_START β€” starts an enclave, after you've set its resources. resources first, then start β€” order matters, bestie, don't come for me πŸ’…
  • ENCLAVE_GET_SLOT β€” gets the slot uid of an enclave. it's giving "who's your slot bestie" πŸͺͺ
  • ENCLAVE_STOP β€” terminates an enclave. dramatic but necessary πŸ’€
  • SLOT_ALLOC β€” allocates a slot for an enclave. securing the spot ✨
  • SLOT_FREE β€” frees the slot allocated for an enclave. closure, periodt πŸ¦‹
  • SLOT_ADD_MEM β€” adds a memory region to an enclave slot. memory room service 🧚
  • SLOT_ADD_VCPU β€” adds a vCPU to an enclave slot. one (1) vCPU, hand-delivered πŸŽ€
  • SLOT_COUNT β€” gets the number of allocated slots. the headcount πŸ‘‘
  • NEXT_SLOT β€” gets the next slot in the list of allocated slots. scrolling to the next one ➑️
  • SLOT_INFO β€” gets the info for a slot, e.g. slot uid, vCPUs count. the full profile, iykyk πŸ”₯
  • SLOT_ADD_BULK_VCPUS β€” adds a number of vCPUs, not providing CPU ids. bulk mode, no ids needed, iconic ⭐
  • MAX_CMD β€” a gatekeeper for the max possible command type. it's literally just standing there holding the door πŸ‘―

🫢 SEE ALSO 🫢

okay so the kernel file for all this is ./drivers/virt/nitro_enclaves/ne_pci_dev.h, and the whole extended friend group is here β€” go say hi:


ngl if you're messing with these, read the friends too β€” the req/reply structs match up with the commands above, and that's the whole point 🧚

that's the page, bestie!! it lives at ./drivers/virt/nitro_enclaves, and this lil slice of documentation is dated October 2026 β€” enum ne_pci_dev_cmd_type(9), slaying in a man page near you πŸ’œβœ¨

πŸ“¦ where this page comes from