STRUCT CXL_MAILBOX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct cxl_mailbox β€” the whole vibe/context container for CXL mailbox operations ✨ (and yes bestie, this is the struct cxl_mailbox(9) page, straight out of the Kernel API Manual, section 9, no cap 🫢)


🌸 SYNOPSIS 🌸

okay so here's literally the whole struct, look at her go πŸ‘‘

struct cxl_mailbox {
    struct device *host;
    unsigned long enabled_cmds[BITS_TO_LONGS( CXL_MEM_COMMAND_ID_MAX)];
    unsigned long exclusive_cmds[BITS_TO_LONGS(CXL_MEM_COMMAND_ID_MAX)];
    size_t payload_size;
    struct mutex mbox_mutex;
    struct mutex feat_mutex;
    struct rcuwait mbox_wait;
    int (*mbox_send)(struct cxl_mailbox *cxl_mbox, struct cxl_mbox_cmd *cmd);
    enum cxl_features_capability feat_cap;
};

πŸŽ€ MEMBERS πŸŽ€

meet the cast, they're all main characters tbh πŸ’…

  • host β€” the device that hosts the mailbox. like, the one whose name is on the lease 😌
  • enabled_cmds β€” the mailbox commands that the driver has enabled. these are the ones that got the green light 🟒
  • exclusive_cmds β€” the mailbox commands that are exclusive to the kernel. kernel-only, invite-only, iykyk πŸ”’
  • payload_size β€” size of the space for the payload (CXL 3.1 8.2.8.4.3 Mailbox Capabilities Register). yes that's the exact citation, go read it bestie πŸ“–
  • mbox_mutex β€” mutex that protects the device mailbox and the firmware. one at a time, we do NOT do chaos here 🚦
  • feat_mutex β€” serializes the multi-part Get/Set Feature transfers. it's giving "line leader energy" so nobody's transfers get tangled 😀
  • mbox_wait β€” an rcuwait for the mailbox. the waiting room, but make it kernel 🌈
  • mbox_send β€” the dev-specific transport for actually transmitting mailbox commands. this is THE messenger fr fr πŸ“¨
  • feat_cap β€” the Features capability. the enum cxl_features_capability one, keeping receipts 🧾

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./include/cxl/mailbox.h πŸ¦‹
  • struct cxl_mbox_cmd(9) β€” go say hi, she's the related icon ✨

ok that's the whole page, you ate that πŸ“ no skimming, everything's still here, every member, every mutex, every citation. periodt πŸ’…

and that's a wrap on struct cxl_mailbox(9) β€” live from ./include/cxl, dated October 2026, mwah πŸ˜˜πŸ’–

πŸ“¦ where this page comes from