qemu-e2k/hw/mem
Jonathan Cameron 415442a1b4 hw/mem/cxl_type3: Add CXL RAS Error Injection Support.
CXL uses PCI AER Internal errors to signal to the host that an error has
occurred. The host can then read more detailed status from the CXL RAS
capability.

For uncorrectable errors: support multiple injection in one operation
as this is needed to reliably test multiple header logging support in an
OS. The equivalent feature doesn't exist for correctable errors, so only
one error need be injected at a time.

Note:
 - Header content needs to be manually specified in a fashion that
   matches the specification for what can be in the header for each
   error type.

Injection via QMP:
{ "execute": "qmp_capabilities" }
...
{ "execute": "cxl-inject-uncorrectable-errors",
  "arguments": {
    "path": "/machine/peripheral/cxl-pmem0",
    "errors": [
        {
            "type": "cache-address-parity",
            "header": [ 3, 4]
        },
        {
            "type": "cache-data-parity",
            "header": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]
        },
        {
            "type": "internal",
            "header": [ 1, 2, 4]
        }
        ]
  }}
...
{ "execute": "cxl-inject-correctable-error",
    "arguments": {
        "path": "/machine/peripheral/cxl-pmem0",
        "type": "physical"
    } }

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20230302133709.30373-9-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-07 12:39:00 -05:00
..
cxl_type3_stubs.c hw/mem/cxl_type3: Add CXL RAS Error Injection Support. 2023-03-07 12:39:00 -05:00
cxl_type3.c hw/mem/cxl_type3: Add CXL RAS Error Injection Support. 2023-03-07 12:39:00 -05:00
Kconfig hw/cxl/device: Add a memory device (8.2.8.5) 2022-05-13 06:13:36 -04:00
memory-device.c qapi: More complex uses of QAPI_LIST_APPEND 2021-01-28 08:08:45 +01:00
meson.build hw/mem/cxl_type3: Add CXL RAS Error Injection Support. 2023-03-07 12:39:00 -05:00
npcm7xx_mc.c hw/*: Use type casting for SysBusDevice in NPCM7XX 2021-01-12 21:19:02 +00:00
nvdimm.c hw/mem/nvdimm: fix error message for 'unarmed' flag 2022-10-24 12:38:38 +02:00
pc-dimm.c qapi machine: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
sparse-mem.c hw/sparse-mem: clear memory on reset 2023-02-16 22:05:46 -05:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h