STRUCT CXL_REGION(9)
π
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. itscxlrdbestie, 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 coordinatecxlr_pmemsetup / 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
- 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