Skip to content

Add more commands to scripts/ghes_inject.py

Mauro Carvalho Chehab qemu-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 0 repliesNew
  2. v213 patches 11 repliesSuperseded
  3. v113 patches 28 repliesSuperseded

Changes in v3 from the cover letter

- Replaced the deprecated SPDX 3.0 "gpl-2.0" which is identical

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14scripts/qmp_helper: add a return code to send_cperscripts/qmp_helper.py+14 -40 replies
2/14scripts/qmp_helper: add missing CXL UEFI GUIDscripts/qmp_helper.py+25 -00 replies
3/14scripts/qmp_helper: add support for FRU Memory Poisonscripts/qmp_helper.py+4 -00 replies
4/14scripts/qmp_helper: make send_cper() more genericscripts/qmp_helper.py+55 -140 replies
5/14scripts/qmp_helper: fix raw_data logicscripts/qmp_helper.py+14 -90 replies
6/14scripts/qmp_helper: add support for a timeout logicscripts/qmp_helper.py+34 -130 replies
7/14scripts/qmp_helper: avoid long lines when possiblescripts/qmp_helper.py+6 -30 replies
8/14scripts/ghes_inject: add a logic to decode CPERMAINTAINERS scripts/ghes_decode.py scripts/qmp_helper.py+1159 -00 replies
9/14scripts/ghes_inject: exit 1 if command was not sentscripts/arm_processor_error.py scripts/ghes_inject.py+3 -20 replies
10/14scripts/ghes_inject: add a handler for PCIe bus errorMAINTAINERS scripts/ghes_inject.py scripts/pcie_bus_error.py+149 -00 replies
11/14scripts/ghes_inject: add support for fuzzy logic testingMAINTAINERS scripts/fuzzy_error.py scripts/ghes_inject.py+209 -00 replies
12/14scripts/ghes_inject: add a raw error inject commandMAINTAINERS scripts/ghes_inject.py scripts/raw_error.py+178 -00 replies
13/14scripts/ghes_inject: print help if no command specifiedscripts/ghes_inject.py+3 -00 replies
14/14scripts/ghes_inject: improve help messagescripts/arm_processor_error.py scripts/fuzzy_error.py scripts/ghes_inject.py +2 more+22 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 00/14] Add more commands to scripts/ghes_inject.py

Now that we have the basic stuff merged on QEMU, add more commands to scripts/ghes_inject.py. After this patch, this tool will support the following commands:

arm Inject an ARM processor error CPER, compatible with
UEFI 2.9A Errata.
pcie-bus Inject a PCIe bus error CPER
fuzzy-test (fuzzy) Inject fuzzy test CPER packets
raw-error (raw) Inject CPER records from previously recorded ones.

Where arm is a pre-existing one.

The pcie-bus command injects a PCIe bus error - currently not supported on Linux (GUID: c5753963-3b84-4095-bf78-eddad3f9c9dd).

The fuzzy-test command allows injecting one or more CPER records for all GUID types supported on UEFI 2.11, with its contents being either zero or random, and with the payload size that can also be random.

The raw-error command allow reproducing a CPER from a text file. It is helpful in conjunction with fuzzy-test to re-test the OSPM after some fixes.

Besides the commands, a new helper logic was added at scripts/ghes_decode.py: when the tool is called with the --debug command line argument, it will translate the injected record, allowing to compare what it was injected with what the OSPM/userspace tools would interpret.

The first 6 patches on this series improve the qmp_helper logic to support the new functionality.

The next 6 patches add the extra functionality to ghes_inject.

The final patch improves its help message when called without a command.

---

v3:
- Replaced the deprecated SPDX 3.0 "gpl-2.0" which is identical

    to "gpl-2.0-only" with "gpl-2.0-or-later", following the same
    license as the other libraries that are part of ghes_inject.py;

- Did some long line cleanups at qmp_helper.py.

- No functional changes.

v2:
- the bus error injection is for PCI/PCI-X, not PCIe, so

    the command was renamed;
  - added notes that not all CXL types may occur in practice;
  - removed a field from common_fields at DecodeGhesEntry
    decode class and make it more robust;

- some cleanups at patch description.

Mauro Carvalho Chehab (14):
scripts/qmp_helper: add a return code to send_cper scripts/qmp_helper: add missing CXL UEFI GUID scripts/qmp_helper: add support for FRU Memory Poison scripts/qmp_helper: make send_cper() more generic scripts/qmp_helper: fix raw_data logic scripts/qmp_helper: add support for a timeout logic scripts/qmp_helper: avoid long lines when possible scripts/ghes_inject: add a logic to decode CPER scripts/ghes_inject: exit 1 if command was not sent scripts/ghes_inject: add a handler for PCIe bus error scripts/ghes_inject: add support for fuzzy logic testing scripts/ghes_inject: add a raw error inject command scripts/ghes_inject: print help if no command specified scripts/ghes_inject: improve help message

 MAINTAINERS                    |    4 +
 scripts/arm_processor_error.py |    8 +-
 scripts/fuzzy_error.py         |  208 ++++++
 scripts/ghes_decode.py         | 1155 ++++++++++++++++++++++++++++++++
 scripts/ghes_inject.py         |   30 +-
 scripts/pcie_bus_error.py      |  148 ++++
 scripts/qmp_helper.py          |  166 ++++-
 scripts/raw_error.py           |  175 +++++
 8 files changed, 1854 insertions(+), 40 deletions(-)
 create mode 100644 scripts/fuzzy_error.py
 create mode 100644 scripts/ghes_decode.py
 create mode 100644 scripts/pcie_bus_error.py
 create mode 100644 scripts/raw_error.py
Signature · 1 line
2.53.0