On Wed, Mar 06, 2024 at 03:03:40PM -0800, Dan Williams wrote: > alison.schofield@ wrote: > > From: Alison Schofield <alison.schofi...@intel.com> > > > > Changes since v9: > > - Replace the multi-use 'name' var, with multiple descriptive > > flavors: memdev_name, region_name, decoder_name (DaveJ) > > - Use a static string table for poison source lookup (DaveJ) > > - Rebased on latest pending > > Link to v9: > > https://lore.kernel.org/r/cover.1709253898.git.alison.schofi...@intel.com/ > > > > > > Add the option to add a memory devices poison list to the cxl-list > > json output. Offer the option by memdev and by region. Sample usage: > > > > # cxl list -m mem1 --media-errors > > [ > > { > > "memdev":"mem1", > > "pmem_size":1073741824, > > "ram_size":1073741824, > > "serial":1, > > "numa_node":1, > > "host":"cxl_mem.1", > > "media_errors":[ > > { > > "dpa":0, > > "length":64, > > "source":"Internal" > > }, > > { > > "decoder":"decoder10.0", > > "hpa":1035355557888, > > "dpa":1073741824, > > "length":64, > > "source":"External" > > }, > > { > > "decoder":"decoder10.0", > > "hpa":1035355566080, > > "dpa":1073745920, > > "length":64, > > "source":"Injected" > > } > > ] > > } > > ] > > > > # cxl list -r region5 --media-errors > > [ > > { > > "region":"region5", > > "resource":1035355553792, > > "size":2147483648, > > "type":"pmem", > > "interleave_ways":2, > > "interleave_granularity":4096, > > "decode_state":"commit", > > "media_errors":[ > > { > > "decoder":"decoder10.0", > > "hpa":1035355557888, > > "dpa":1073741824, > > "length":64, > > I notice that the ndctl --media-errors records are: > > { offset, length } > > ...it is not clear to me that "dpa" and "hpa" have much meaning to > userspace by default. Physical address information is privileged, so if > these records were { offset, length } tuples there is the possibility > that they can be provided to non-root. > > "Offset" is region relative "hpa" when listing region media errors, and > "offset" is memdev relative "dpa" while listing memdev relative media > errors.
Done. memdev relative dpa is just dpa right? Unless you are thinking offset into a partition? I don't think so.