CXL-INJECT-MEDIA-POISON(1)

πŸ“¦
version 85 Β· 4 versions
, in arch rolling

πŸ’– CXL-INJECT-MEDIA-POISON(1) πŸ’–

okay so bestie, welcome to the cxl manual β€” this one's all about cxl-inject-media-poison, and it's giving "powerful but please be careful" energy fr fr.


✨ NAME ✨

cxl-inject-media-poison β€” inject poison into CXL memory πŸ§ͺπŸ’€


🌸 SYNOPSIS 🌸

cxl inject-media-poison <memdev> [<options>]
⚠️ Warning ⚠️ Poison injection can cause system instability, and it should only be used for debugging hardware and software error recovery flows. Use at your own risk, bestie β€” no cap, this is the dangerous one. 🚨

πŸ¦‹ DESCRIPTION πŸ¦‹

So what this does is inject poison into a CXL memory device's memory. Iconic but scary, iykyk.

You can point at a CXL memdev in any of these ways, lowkey your choice:

  • by device name (e.g. "mem0")
  • by device id (the "X" in "memX")
  • by host device name ("0000:35:00.0")

Poison can only be used with CXL memory devices that actually support poison injection. Wanna see which CXL devices support it? Look at the "poison_injectable" attribute under the device in cxl-list. Here's what a device that supports poison injection looks like πŸ‘‡

# cxl list -u -m mem0
{
        "memdev":"mem0",
        "ram_size":"256.00 MiB (268.44 MB)",
        "serial":"0",
        "host":"0000:0d:00.0",
        "firmware_version":"BWFW VERSION 00",
        "poison_injectable":true
}

A device physical address is required for poison injection β€” you literally can't do it without one. The -a/--address option is how you specify the device physical address you want to inject poison into. The address can be given in either decimal or hexadecimal, so flex whichever you vibe with. For example ✨

# cxl inject-media-poison mem0 -a 0x1000
poison inject at mem0:0x1000
# cxl list -m mem0 -u --media-errors
{
  "memdev":"mem0",
  "ram_size":"256.00 MiB (268.44 MB)",
  "serial":"0",
  "host":"0000:0d:00.0",
  "firmware_version":"BWFW VERSION 00",
  "media_errors":[
    {
      "offset":"0x1000",
      "length":64,
      "source":"Injected"
    }
  ]
}

And when you're done being chaotic, go see the clear-media-poison command for how to clear poison from a CXL memory device 🧹✨

Also important: this command relies on the CXL debugfs to inject poison (normally mounted at "/sys/kernel/debug/cxl"). If the CXL debugfs is inaccessible, the "poison_injectable" attribute will always be set to "false" β€” so if it's saying false when you know it shouldn't, check your debugfs mount, bestie 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -a, --address β€” the Device physical address (DPA) to use for poison injection. You can write the address in hex or decimal. This one is required for poison injection, no skipping it πŸ’…
  • --debug β€” turns on debug output, for when you wanna see what's actually going on πŸ”

🌈 SEE ALSO 🌈

cxl-list(1) cxl-clear-media-poison(1)


and that's the whole page, bestie 🫢 this was cxl (the manual source), from the 2026-06-30 era β€” aka CXL-INJECT-MEDIA-POISON(1), version of record, mwah πŸ’‹ go inject responsibly πŸ‘‘

πŸ“¦ 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