enqcmds(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enqcmds(9) ✨

welcome to the Kernel API Manual, bestie β€” we're doing kernel-mode hardware stuff today and it's honestly iconic 🫢


🌸 NAME 🌸

enqcmds β€” enqueue a command in supervisor (CPL0) mode πŸ’«

✨ SYNOPSIS ✨

int enqcmds (void __iomem *dst , const void *src );

that's the whole signature, no cap 😌

πŸŽ€ ARGUMENTS πŸŽ€

  • dst β€” destination, in MMIO space (must be 512-bit aligned) πŸ“
  • src β€” 512 bits memory operand 🧺

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the ENQCMDS instruction lets software write a 512-bit command to a 512-bit-aligned special MMIO region that supports the instruction. it's giving very specific hardware energy πŸ”₯

a return status gets loaded into the ZF flag in the RFLAGS register. ZF = 0 equates to success, and ZF = 1 indicates retry or error β€” so yes, zero is the slay outcome and one means retry or something went sideways πŸ˜­πŸ’€

this function issues the ENQCMDS instruction to submit data from kernel space to MMIO space, in a unit of 512 bits. order of data access is not guaranteed, nor is a memory barrier performed afterwards. it returns 0 on success and -EAGAIN on failure. periodt πŸ’…

⚠️ Warning: Do not use this helper unless your driver has checked that the ENQCMDS instruction is supported on the platform and the device accepts ENQCMDS. like, fr fr β€” no vibes-based driver assumptions here πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./arch/x86/include/asm/special_insns.h β€” go read it for the receipts, bestie πŸ“šβœ¨


mwah πŸ’‹ β€” page source/version is ./arch/x86/include/asm, dated October 2026. stay iconic, kernel bestie πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from