@@ -415,6 +415,70 @@ OPTIONS
--region::
Specify CXL region device name(s), or device id(s), to filter the listing.
+-L::
+--poison::
+ Include poison information. The poison list is retrieved from the
+ device(s) and poison records are added to the listing. Apply this
+ option to memdevs and regions where devices support the poison
+ list capability.
+
+----
+# cxl list -m mem11 --poison
+[
+ {
+ "memdev":"mem11",
+ "pmem_size":268435456,
+ "ram_size":0,
+ "serial":0,
+ "host":"0000:37:00.0",
+ "poison":{
+ "nr_poison_records":1,
+ "poison_records":[
+ {
+ "dpa":0,
+ "dpa_length":64,
+ "source":"Internal",
+ "flags":"",
+ "overflow_time":0
+ }
+ ]
+ }
+ }
+]
+# cxl list -r region5 --poison
+[
+ {
+ "region":"region5",
+ "resource":1035623989248,
+ "size":2147483648,
+ "interleave_ways":2,
+ "interleave_granularity":4096,
+ "decode_state":"commit",
+ "poison":{
+ "nr_poison_records":2,
+ "poison_records":[
+ {
+ "memdev":"mem2",
+ "dpa":0,
+ "dpa_length":64,
+ "source":"Internal",
+ "flags":"",
+ "overflow_time":0
+ },
+ {
+ "memdev":"mem5",
+ "dpa":0,
+ "length":512,
+ "source":"Vendor",
+ "flags":"",
+ "overflow_time":0
+ }
+ ]
+ }
+ }
+]
+----
+
-v::
--verbose::
Increase verbosity of the output. This can be specified
@@ -30,6 +30,7 @@ struct cxl_filter_params {
bool fw;
bool alert_config;
bool dax;
+ bool poison;
int verbose;
struct log_ctx ctx;
};
@@ -88,6 +89,8 @@ static inline unsigned long cxl_filter_to_flags(struct cxl_filter_params *param)
flags |= UTIL_JSON_ALERT_CONFIG;
if (param->dax)
flags |= UTIL_JSON_DAX | UTIL_JSON_DAX_DEVS;
+ if (param->poison)
+ flags |= UTIL_JSON_POISON_LIST;
return flags;
}
@@ -57,6 +57,8 @@ static const struct option options[] = {
"include memory device firmware information"),
OPT_BOOLEAN('A', "alert-config", ¶m.alert_config,
"include alert configuration information"),
+ OPT_BOOLEAN('L', "poison", ¶m.poison,
+ "include poison information "),
OPT_INCR('v', "verbose", ¶m.verbose, "increase output detail"),
#ifdef ENABLE_DEBUG
OPT_BOOLEAN(0, "debug", &debug, "debug list walk"),