cxl/mbox: Add GET_POISON_LIST mailbox command
authorAlison Schofield <alison.schofield@intel.com>
Tue, 18 Apr 2023 17:39:04 +0000 (10:39 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 23 Apr 2023 18:45:49 +0000 (11:45 -0700)
commited83f7ca398b3798b82c1d5d1113011c0e5a2198
treeb4ca5431d18d19c2403bee8d878e913cfe35ebdf
parentd0abf5787adc0341a04667d3b4a23b4d0999af30
cxl/mbox: Add GET_POISON_LIST mailbox command

CXL devices maintain a list of locations that are poisoned or result
in poison if the addresses are accessed by the host.

Per the spec, (CXL 3.0 8.2.9.8.4.1), the device returns this Poison
list as a set of Media Error Records that include the source of the
error, the starting device physical address, and length. The length is
the number of adjacent DPAs in the record and is in units of 64 bytes.

Retrieve the poison list.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/a1f332e817834ef8e89c0ff32e760308fb903346.1681838291.git.alison.schofield@intel.com
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/mbox.c
drivers/cxl/cxlmem.h