qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v6 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.
Date: Thu, 2 Mar 2023 11:49:52 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 2/3/23 11:06, Jonathan Cameron wrote:
+CC Michael Roth.

Michael Tsirkin noted I'd missed CCing QAPI maintaintainers on the
poison injection series so I went back to check the others I had out for review.
For this series I'd managed to pick up one of two as Markus gave comments on
earlier versions.

Now LGTM for meson/QAPI (although I'm not a QAPI maintainer).

Hopefully MST can take your series just in time for soft freeze.

On Mon, 27 Feb 2023 11:27:51 +0000
Jonathan Cameron via <qemu-devel@nongnu.org> wrote:

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>
---
v6: (Thanks to Philippe Mathieu-Daudé)
- Add Since entries in cxl.json
- Add error prints in the stub functions so that if they are called without
   CONFIG_CXL_MEM_DEVICE then we get a useful print rather than just silently
   eating them.
---
  hw/cxl/cxl-component-utils.c   |   4 +-
  hw/mem/cxl_type3.c             | 281 +++++++++++++++++++++++++++++++++
  hw/mem/cxl_type3_stubs.c       |  17 ++
  hw/mem/meson.build             |   2 +
  include/hw/cxl/cxl_component.h |  26 +++
  include/hw/cxl/cxl_device.h    |  11 ++
  qapi/cxl.json                  | 128 +++++++++++++++
  qapi/meson.build               |   1 +
  qapi/qapi-schema.json          |   1 +
  9 files changed, 470 insertions(+), 1 deletion(-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]