ne_do_request(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ne_do_request(9) β€” Kernel API Manual, but make it make sense

okay so bestie, welcome to the ne_do_request(9) page, straight out of the Kernel API Manual ✨ this one's all about sliding a command request over to your PCI device based on what type of command it is, then catching the reply it sends back. it's giving "middleman but make it kernel" πŸŽ€


✨ NAME ✨

ne_do_request β€” submit a command request to the PCI device based on the command type, and grab the associated reply that comes back. that's literally it, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

int ne_do_request (struct pci_dev *pdev , enum ne_pci_dev_cmd_type
cmd_type , void *cmd_request , size_t cmd_request_size , struct
ne_pci_dev_cmd_reply *cmd_reply , size_t cmd_reply_size );

like, copy it exactly please, no typos, she's sensitive 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” the PCI device you're sending the command to and getting the reply from. your main character device, fr fr πŸ‘‘
  • cmd_type β€” the command type of the request you're sending to the PCI device. tells it what kind of energy we're on today.
  • cmd_request β€” the command request payload. the actual goods πŸ’–
  • cmd_request_size β€” the size of the command request payload. gotta know how big the goods are.
  • cmd_reply β€” the command reply payload. where the device's answer lands.
  • cmd_reply_size β€” the size of the command reply payload. same energy, but for the reply this time.

πŸ’… CONTEXT πŸ’…

process context, bestie. and listen β€” this function uses the ne_pci_dev mutex so that only one command at a time gets handled. no cap, one at a time, no line-cutting πŸ™ˆ


⭐ RETURN ⭐

  • 0 on success. slay, it worked πŸ’―
  • a negative return value on failure. not the vibe, but at least you know 😭

πŸ¦‹ SEE ALSO πŸ¦‹

okay this list is LONG but we're not skipping a single one, because every reference is iconic in her own way 🌈

  • Kernel file ./drivers/virt/nitro_enclaves/ne_pci_dev.h Nitro Enclaves (NE) PCI device(9)
  • PCI_DEVICE_ID_NE(9)
  • PCI_BAR_NE(9)
  • Device registers in the NE PCI device MMIO BAR(9)
  • NE_ENABLE(9)
  • NE_VERSION(9)
  • NE_COMMAND(9)
  • NE_EVTCNT(9)
  • NE_SEND_DATA(9)
  • NE_RECV_DATA(9)
  • Device MMIO buffer sizes(9)
  • NE_SEND_DATA_SIZE(9)
  • NE_RECV_DATA_SIZE(9)
  • MSI-X interrupt vectors(9)
  • NE_VEC_REPLY(9)
  • NE_VEC_EVENT(9)
  • enum ne_pci_dev_cmd_type(9)
  • Device commands - payload structure for requests and replies.(9)
  • struct enclave_start_req(9)
  • struct enclave_get_slot_req(9)
  • struct enclave_stop_req(9)
  • struct slot_alloc_req(9)
  • struct slot_free_req(9)
  • struct slot_add_mem_req(9)
  • struct slot_add_vcpu_req(9)
  • struct slot_count_req(9)
  • struct next_slot_req(9)
  • struct slot_info_req(9)
  • struct slot_add_bulk_vcpus_req(9)
  • struct ne_pci_dev_cmd_reply(9)
  • struct ne_pci_dev(9)

ngl, that's a whole friend group of references and they all ate πŸ’… go read them if you want the full lore, iykyk

and that's the page!! 🫢 source check: this one lives over at ./drivers/virt/nitro_enclaves, dated October 2026, and the page itself is ne_do_request(9) β€” periodt, we're done here πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from