STRUCT CXL_POISON_STATE(9)
β¨ struct cxl_poison_state(9) β¨
okay bestie, welcome to the Kernel API Manual π β this one's a struct page, and it's literally the vibe check for driver poison state info. no cap, it's short but it matters.
πΈ NAME πΈ
struct cxl_poison_state β driver poison state info. yep, that's it, that's the whole name. iconic brevity honestly π
π¦ SYNOPSIS π¦
here's the whole shape of it, bestie β do NOT touch the formatting, this is copy-paste sacred:
struct cxl_poison_state {
u32 max_errors;
unsigned long enabled_cmds[BITS_TO_LONGS( CXL_POISON_ENABLED_MAX)];
struct cxl_mbox_poison_out *list_out;
struct mutex mutex;
};
look at her. four members. main character energy π
π Members π
max_errorsβ the max number of media error records the device cache can hold. like, the ceiling, the limit, the cap fr fr πenabled_cmdsβ every poison command that's enabled in the CEL. all the ones that made the cut, stored asunsigned long enabled_cmds[BITS_TO_LONGS( CXL_POISON_ENABLED_MAX)]βlist_outβ the poison list payload that the device hands back to you.struct cxl_mbox_poison_out *list_out, the actual goods π¦mutexβ astruct mutexthat protects reads of the poison list. the bouncer at the club, keeping things orderly π«Ά
π₯ Description π₯
okay so here's the tea β β reads of the poison list are synchronized. why? because you do NOT want a reader getting an incomplete list just because their request overlapped another read request of the same DPA range.
and "overlapped" here covers both flavors of mess, so listen up: their request was interrupted by another read request of the same DPA range, or preceded by one. either way, no half-list for you π
the receipts on this one? CXL Spec 3.0 Section 8.2.9.8.4.1 β go read it, iykyk π
lowkey important: the sync is the whole point of the mutex. no mutex, no clean list. periodt π
π SEE ALSO π
go poke around the kernel file ./drivers/cxl/cxlmem.h and also say hi to these legends π:
struct cxl_memdev(9)struct cxl_attach_region(9)struct cxl_event_state(9)struct cxl_fw_state(9)struct cxl_security_state(9)struct cxl_memdev_state(9)struct cxl_mem_command(9)struct cxl_hdm(9)
and that's the page, bestie π§π this lil masterpiece lives over in ./drivers/cxl, dated October 2026, and it answers to struct cxl_poison_state(9) β slay, go read some kernel headers, you got this πβ¨
π¦ 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