CXL-CREATE-REGION(1)
π CXL-CREATE-REGION(1) β like, the cxl manual page, bestie β¨
okay so this is cxl-create-region from the cxl manual, and it's genuinely the main-character command of the whole CXL saga. sit down, grab a strawberry π, and let me tell you how to assemble a whole CXL region by setting up the attributes of its constituent CXL memdevs. no cap, it's iconic.
πΈ NAME πΈ
cxl-create-region β assemble a CXL region by setting up attributes of its constituent CXL memdevs. literally its whole job, and it ate.
β¨ SYNOPSIS β¨
cxl create-region [<options>]
π¦ DESCRIPTION π¦
so a CXL region is composed of one or more slices of CXL memdevs, with configurable interleave settings β both the number of interleave ways and the interleave granularity. both. you get to pick both. obsessed.
For create-region, a size can optionally be specified, but if not, the maximum possible size for each memdev will be used up to the available decode capacity in the system for the given memory type. For persistent regions a UUID can optionally be specified, but if not, one will be generated. the command's got you, it'll make one for you π
If the region-creation operation is successful, a region object will be emitted on stdout in JSON format (see the examples below, they're right there). If the specified arguments cannot be satisfied with a legal configuration, then an appropriate error will be emitted on stderr. so like, vibe check failed, you get an error. that's the deal π
π EXAMPLE π
here's the moment you've been waiting for, bestie:
#cxl create-region -m -d decoder0.1 -w 2 -g 1024 mem0 mem1
{
"region":"region0",
"resource":"0xc90000000",
"size":"512.00 MiB (536.87 MB)",
"interleave_ways":2,
"interleave_granularity":1024,
"mappings":[
{
"position":1,
"decoder":"decoder4.0"
},
{
"position":0,
"decoder":"decoder3.0"
}
]
}
created 1 region
look at that JSON. look at it. created 1 region at the end like a little bow on top π
π OPTIONS π
<target(s)>β the CXL targets that should be used to form the region. and listen, the number of target arguments must match the--waysoption (if provided). them's the rules, fr fr.-b,--bus=β restrict the operation to the specified bus. keep it contained, keep it cute.-m,--memdevsβ indicate that the non-option arguments for target(s) refer to memdev device names. If this option is omitted and no targets are specified thencreate-regionuses the equivalent ofcxl list -M -d $decoderinternally as the target list. Note that depending on the topology, for example with switches, the automatic target list ordering may not be valid and manual specification of the target list is required. so like, sometimes auto is not it, and you gotta do it yourself π-s,--size=β specify the total size for the new region. This is optional, and by default, the maximum possible size will be used. The maximum possible size is gated by both the contiguous free HPA space remaining in the root decoder, and the available DPA space in the component memdevs. two gates, no shortcuts, the math is mathing π₯-t,--type=β specify the region type βpmemorram. Default to root decoder capability, and if that is ambiguous, default topmem. indecisive? it's giving pmem by default, bestie.-U,--uuid=β specify a UUID for the new region. This shouldn't usually need to be specified, as one will be generated by default. Only applicable topmemregions. ram girlies, this one's not for you π-w,--ways=β the number of interleave ways for the new region's interleave. This should be equal to the number of memdevs specified in--memdevs, if--memdevsis being supplied. If--waysis not specified, it will be determined based on the number of memdev targets provided. it counts them for you, slay.-g,--granularity=β the interleave granularity for the new region. Must match the selected root decoder's (if provided) granularity. If the root decoder is interleaved across more than one host-bridge then this value must match that granularity. Otherwise, for non-interleaved decode windows, any granularity can be specified as long as all devices support that setting. mixing and matching = no. matching = yes. periodt.-d,--decoder=β the root decoder that the region should be created under. If not supplied, the first cross-host bridge (if available), decoder that supports the largest interleave will be chosen. it picks the baddest one available for you, lowkey generous.-Q,--enforce-qosβ parameter to enforceqos_classmismatch failure. Region create operation will fail of theqos_classof the root decoder and one of the memdev that backs the region mismatches. yes that's the original wording, and yes it means what you think: mismatch β π β failure.-u,--humanβ by default the command will output machine-friendly raw-integer data. Instead, with this flag, numbers representing storage size will be formatted as human readable strings with units, other fields are converted to hexadecimal strings. for the girlies who want numbers they can actually read π«Ά--debugβ turn on additional debug messages including library debug. when shit is not making sense, this is your emotional support flag. π
π COPYRIGHT π
Copyright Β© 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL version 2 http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (so like, legally speaking, no promises. the lawyers said it, not me π)
π SEE ALSO π
and that's the page, bestie β¨ this was the cxl manual, dated 2026-06-30 β go forth, create regions, be the main character of your own decode window ππ
π¦ where this page comes from
- arch rolling: ndctl 85-1 Β· LGPL-2.1-only AND GPL-2.0-only AND CC0-1.0 AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms