On Fri, Mar 15, 2024 at 10:09:44AM +0900, Wonjae Lee wrote:
> [email protected] wrote:
> > From: Alison Schofield <[email protected]>
> >
> > The --media-errors option to 'cxl list' retrieves poison lists from
> > memory devices supporting the capability and displays the returned
> > media_error records in the cxl list json. This option can apply to
> > memdevs or regions.
> >
> > Include media-errors in the -vvv verbose option.
> >
> > Example usage in the Documentation/cxl/cxl-list.txt update.
> >
> > Signed-off-by: Alison Schofield <[email protected]>
> > ---
> > Documentation/cxl/cxl-list.txt 62 +++++++++++++++++++++++++++++++++-
> > cxl/filter.h                    3 ++
> > cxl/list.c                      3 ++
> > 3 files changed, 67 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/cxl/cxl-list.txt b/Documentation/cxl/cxl-list.txt
> > index 838de4086678..6d3ef92c29e8 100644
> > --- a/Documentation/cxl/cxl-list.txt
> > +++ b/Documentation/cxl/cxl-list.txt
> 
> [snip]
> 
> +----
> +In the above example, region mappings can be found using:
> +"cxl list -p mem9 --decoders"
> +----
> 
> Hi, isn't it '-m mem9' instead of -p? FYI, it's also on patch's
> cover letter, too.

Thanks for the review! I went with -p because it gives only
the endpoint decoder while -m gives all the decoders up to
the root - more than needed to discover the region.

Here are the 2 outputs - what do you think?

# cxl list -p mem9 --decoders -u
{
  "decoder":"decoder20.0",
  "resource":"0xf110000000",
  "size":"2.00 GiB (2.15 GB)",
  "interleave_ways":2,
  "interleave_granularity":4096,
  "region":"region5",
  "dpa_resource":"0x40000000",
  "dpa_size":"1024.00 MiB (1073.74 MB)",
  "mode":"pmem"
}

# cxl list -m mem9 --decoders -u
[
  {
    "root decoders":[
      {
        "decoder":"decoder7.1",
        "resource":"0xf050000000",
        "size":"2.00 GiB (2.15 GB)",
        "interleave_ways":2,
        "interleave_granularity":4096,
        "max_available_extent":"2.00 GiB (2.15 GB)",
        "volatile_capable":true,
        "qos_class":42,
        "nr_targets":2
      },
      {
        "decoder":"decoder7.3",
        "resource":"0xf110000000",
        "size":"2.00 GiB (2.15 GB)",
        "interleave_ways":2,
        "interleave_granularity":4096,
        "max_available_extent":0,
        "pmem_capable":true,
        "qos_class":42,
        "nr_targets":2
      }
    ]
  },
  {
    "port decoders":[
      {
        "decoder":"decoder9.0",
        "resource":"0xf110000000",
        "size":"2.00 GiB (2.15 GB)",
        "interleave_ways":1,
        "region":"region5",
        "nr_targets":1
      },
      {
        "decoder":"decoder13.0",
        "resource":"0xf110000000",
        "size":"2.00 GiB (2.15 GB)",
        "interleave_ways":1,
        "region":"region5",
        "nr_targets":1
      }
    ]
  },
  {
    "endpoint decoders":[
      {
        "decoder":"decoder20.0",
        "resource":"0xf110000000",
        "size":"2.00 GiB (2.15 GB)",
        "interleave_ways":2,
        "interleave_granularity":4096,
        "region":"region5",
        "dpa_resource":"0x40000000",
        "dpa_size":"1024.00 MiB (1073.74 MB)",
        "mode":"pmem"
      }
    ]
  }
]

> 
> Thanks,
> Wonjae

Reply via email to