STRUCT CXL_COMMAND_INFO(9)
π struct cxl_command_info(9) π
hii bestie, welcome to the glow-up of your life β this is the struct cxl_command_info(9) page from the Kernel API Manual, and ngl it's lowkey iconic. it's giving "tiny struct, big main character energy." let's get into it π«Ά
β¨ NAME β¨
struct cxl_command_info β Command information returned from a query. that's the whole vibe, no notes π
π SYNOPSIS π
okay so picture the struct, right? here she is, exactly as she comes, no edits:
struct cxl_command_info {
__u32 id;
__u32 flags;
#define CXL_MEM_COMMAND_FLAG_MASK GENMASK(1, 0);
#define CXL_MEM_COMMAND_FLAG_ENABLED BIT(0);
#define CXL_MEM_COMMAND_FLAG_EXCLUSIVE BIT(1);
__u32 size_in;
__u32 size_out;
};
not me zooming in on every single #define β yes, the semicolons are there, yes, we are copying them character for character, periodt π
πΈ MEMBERS πΈ
idβ the ID number for the command. it's literally her name tag π·οΈflagsβ flags that specify command behavior. the personality settings, if you will β¨size_inβ expected input size, or~0if variable length. so~0means "idk bestie, it varies" πsize_outβ expected output size, or~0if variable length. same deal,~0= variable length, no cap π¦
π§ DESCRIPTION π§
CXL_MEM_COMMAND_FLAG_USER_ENABLED
okay so: the given command id is supported by the driver and it's supported by a related opcode on the device. both sides said yes, it's a whole mutual thing π
CXL_MEM_COMMAND_FLAG_EXCLUSIVE
π¨ bestie listen β requests with the given command id will terminate with EBUSY because the kernel is actively owning management of that resource. like, the kernel has claimed it, it's her resource now, back off π
for example, the label-storage-area can not be written while the kernel is actively managing that space. do not try it. that's the whole warning. π
what even is this struct, fr fr
she represents a single command that is supported by both the driver and the hardware β both, together, a duo π and she's returned as part of an array from the query ioctl.
so like, the following would be a command that takes a variable length input and returns 0 bytes of output β look at her go:
id = 10flags = CXL_MEM_COMMAND_FLAG_ENABLEDsize_in = ~0size_out = 0
see that? ~0 in, 0 out. the way that works is honestly so satisfying π
also, go look at struct cxl_mem_query_commands β she's the friend this struct rolls with π«Ά
π SEE ALSO π
the girlies and guys you should also be reading:
- Kernel file
./include/uapi/linux/cxl_mem.hUAPI(9)π struct cxl_mem_query_commands(9)struct cxl_send_command(9)
and that's the page!! that's her!! π
so this lil drop comes to you from the source path ./include/uapi/linux, dated October 2026, and she answers to the name struct cxl_command_info(9). slay, bye, go read your headers πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms