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 --ways option (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 then create-region uses the equivalent of cxl list -M -d $decoder internally 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 β€” pmem or ram. Default to root decoder capability, and if that is ambiguous, default to pmem. 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 to pmem regions. 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 --memdevs is being supplied. If --ways is 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 enforce qos_class mismatch failure. Region create operation will fail of the qos_class of 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 Β© 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