STRUCT CXL_REGION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct cxl_region β€” CXL region

okay so this is struct cxl_region(9) from the Kernel API Manual, and honestly? it's kind of the main character of the CXL world. bestie, this is the struct that is the region β€” a chunk of CXL address space the kernel knows and loves. let's get into it πŸŽ€


✨ NAME ✨

struct cxl_region β€” literally the CXL region struct, that's it, that's the whole vibe πŸ’–


🌸 SYNOPSIS 🌸

here's the whole thing, copy-paste energy, not one field changed:

struct cxl_region {
    struct device dev;
    int id;
    struct cxl_root_decoder *cxlrd;
    struct range hpa_range;
    enum cxl_partition_mode mode;
    enum cxl_decoder_type type;
    struct cxl_nvdimm_bridge *cxl_nvb;
    struct cxl_pmem_region *cxlr_pmem;
    unsigned long flags;
    struct cxl_region_params params;
    struct access_coordinate coord[ACCESS_COORDINATE_MAX];
    struct notifier_block node_notifier;
    struct notifier_block adist_notifier;
    struct notifier_block mce_notifier;
 };

look at her. iconic. πŸ‘‘


πŸ¦‹ Members πŸ¦‹

let me introduce you to every single member, no skipping, no cap:

  • dev β€” this region's device. it's the region's whole identity in the device model 🫢
  • id β€” this region's id. and this one's important: the id is globally unique across all regions, so like. no two regions are out here twinning πŸ’…
  • cxlrd β€” the region's root decoder. its cxlrd bestie, if you will 🌈
  • hpa_range β€” the address range occupied by the region. so β€” where it lives, physically πŸ“
  • mode β€” the operational mode of the mapped capacity βš™οΈ
  • type β€” the endpoint decoder target type 🎯
  • cxl_nvb β€” the nvdimm bridge, there to coordinate cxlr_pmem setup / shutdown. teamwork fr fr 🀝
  • cxlr_pmem β€” (for pmem regions) a cached copy of the nvdimm bridge. cached! like a little save file πŸ’Ύ
  • flags β€” region state flags 🚩
  • params β€” active + config params for the region. both eras of params, together πŸŽ€
  • coord β€” QoS access coordinates for the region. quality-of-service tea β˜•
  • node_notifier β€” notifier for setting the access coordinates to node πŸ“¬
  • adist_notifier β€” notifier for calculating the abstract distance of node πŸ“
  • mce_notifier β€” notifier for MCE ⚠️

πŸ”₯ SEE ALSO πŸ”₯

go read these next, bestie, they're all connected:

Kernel file ./drivers/cxl/cxl.h, cxl objects(9), struct cxl_decoder(9), struct cxl_endpoint_decoder(9), struct cxl_switch_decoder(9), struct cxl_rd_ops(9), struct cxl_root_decoder(9), struct cxl_region_params(9), struct cxl_port(9), struct cxl_root(9), struct cxl_dport(9), struct cxl_ep(9), struct cxl_region_ref(9), struct cxl_endpoint_dvsec_info(9)


ngl the whole struct is giving very much "organized chaos that absolutely slays" β€” every field has a job and every job has a field 🧚

and that's the page!! shipped from ./drivers/cxl, dated October 2026, and archived forever as struct cxl_region(9). mwah, go read the kernel source, ily πŸ’œβœ¨

πŸ“¦ where this page comes from