qemu-cr16/scripts
Mauro Carvalho Chehab 4cc103081b scripts/ghes_inject: add a script to generate GHES error inject
Using the QMP GHESv2 API requires preparing a raw data array
containing a CPER record.

Add a helper script with subcommands to prepare such data.

Currently, only ARM Processor error CPER record is supported, by
using:
	$ ghes_inject.py arm

which produces those warnings on Linux:

[  705.032426] [Firmware Warn]: GHES: Unhandled processor error type 0x02: cache error
[  774.866308] {4}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
[  774.866583] {4}[Hardware Error]: event severity: recoverable
[  774.866738] {4}[Hardware Error]:  Error 0, type: recoverable
[  774.866889] {4}[Hardware Error]:   section_type: ARM processor error
[  774.867048] {4}[Hardware Error]:   MIDR: 0x00000000000f0510
[  774.867189] {4}[Hardware Error]:   running state: 0x0
[  774.867321] {4}[Hardware Error]:   Power State Coordination Interface state: 0
[  774.867511] {4}[Hardware Error]:   Error info structure 0:
[  774.867679] {4}[Hardware Error]:   num errors: 2
[  774.867801] {4}[Hardware Error]:    error_type: 0x02: cache error
[  774.867962] {4}[Hardware Error]:    error_info: 0x000000000091000f
[  774.868124] {4}[Hardware Error]:     transaction type: Data Access
[  774.868280] {4}[Hardware Error]:     cache error, operation type: Data write
[  774.868465] {4}[Hardware Error]:     cache level: 2
[  774.868592] {4}[Hardware Error]:     processor context not corrupted
[  774.868774] [Firmware Warn]: GHES: Unhandled processor error type 0x02: cache error

Such script allows customizing the error data, allowing to change
all fields at the record. Please use:

	$ ghes_inject.py arm -h

For more details about its usage.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <5ea174638e33d23635332fa6d4ae9d751355f127.1758610789.git.mchehab+huawei@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-10-05 08:17:08 -04:00
..
ci tests/lcitool: add missing rust-std dep 2025-09-30 19:33:25 +04:00
coccinelle hw: Define new device_class_set_legacy_reset() 2024-09-13 15:31:44 +01:00
codeconverter qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
coverage
coverity-scan scripts/coverity-scan/COMPONENTS.md: Add a 'plugins' category 2025-09-02 17:57:05 +02:00
kvm target/i386: enumerate VMX nested-exception support 2024-06-08 10:33:38 +02:00
lib/kdoc scripts/kernel-doc: tweak for QEMU coding standards 2025-08-30 16:37:23 +01:00
modules
oss-fuzz treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
performance scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
qapi treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
qemu-guest-agent qemu-ga: Optimize freeze-hook script logic of logging error 2025-01-06 12:57:13 +02:00
qemugdb treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
qmp
rust rust: use native Meson support for clippy and rustdoc 2025-06-03 22:42:18 +02:00
simplebench scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
tracetool tracetool/syslog: add Rust support 2025-10-01 11:22:07 -04:00
analyse-9p-simpletrace.py
analyse-locks-simpletrace.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
analyze-inclusions include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
analyze-migration.py migration: Add MIG_CMD_SWITCHOVER_START and its load handler 2025-03-06 06:47:33 +01:00
archive-source.sh scripts/archive-source: use a bash array 2025-09-30 19:33:25 +04:00
arm_processor_error.py scripts/ghes_inject: add a script to generate GHES error inject 2025-10-05 08:17:08 -04:00
block-coroutine-wrapper.py block-coroutine-wrapper: use qemu_get_current_aio_context() 2023-12-21 22:49:28 +01:00
check_sparse.py
checkpatch.pl checkpatch: Ignore removed lines in license check 2025-09-26 09:55:19 +01:00
clean-header-guards.pl
clean-includes include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
cleanup-trace-events.pl
cocci-macro-file.h win32: remove usage of attribute gcc_struct 2025-01-17 10:45:13 +00:00
compare-machine-types.py scripts: add script to compare compatibility properties 2024-04-25 10:12:48 +02:00
cpu-x86-uarch-abi.py scripts: drop comment about autogenerated CPU API file 2024-02-09 12:48:07 +00:00
decodetree.py decodetree: Infer argument set before inferring format 2025-07-25 10:31:45 +01:00
device-crash-test scripts: replace FSF postal address with licenses URL 2025-06-26 00:42:37 +02:00
disas-objdump.pl
dump-guest-memory.py
entitlement.sh
extract-vsssdk-headers
feature_to_c.py gdbstub: Add members to identify registers to GDBFeature 2024-02-28 09:10:11 +00:00
fix-multiline-comments.sh
get-wraps-from-cargo-registry.py scripts: add script to help distros use global Rust packages 2025-07-25 14:51:05 +02:00
get_maintainer.pl scripts/get_maintainer.pl: don't print parentheses 2023-10-17 15:20:53 +02:00
ghes_inject.py scripts/ghes_inject: add a script to generate GHES error inject 2025-10-05 08:17:08 -04:00
git-submodule.sh scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour 2023-07-25 10:56:51 +01:00
git.orderfile
hxtool
kernel-doc.py scripts: Import Python kerneldoc from Linux kernel 2025-08-30 16:37:23 +01:00
make-config-poison.sh
make-release subprojects: add attrs crate 2025-09-22 17:17:18 +02:00
meson-buildoptions.py scripts: dump stdin on meson-buildoptions error 2025-03-06 12:44:46 +01:00
meson-buildoptions.sh meson: remove 'gnutls-bug1717-workaround' for migration TLS crashes 2025-08-05 16:27:25 -03:00
meson.build
minikconf.py scripts/minikconf.py: s/Error/KconfigParserError 2025-08-20 22:47:54 +02:00
modinfo-collect.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
modinfo-generate.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
mtest2make.py tests/qtest: add TIMEOUT_MULTIPLIER 2024-12-12 10:25:38 -03:00
nsis.py Fix objdump output parser in "nsis.py" 2025-04-13 13:45:41 +03:00
probe-gdb-support.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
python_qmp_updater.py scripts: add python_qmp_updater.py 2023-10-12 14:21:44 -04:00
qapi-gen.py
qcow2-to-stdout.py scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout 2025-03-13 17:57:23 +01:00
qemu-binfmt-conf.sh binfmt: Add --ignore-family option 2025-03-04 15:42:54 +10:00
qemu-gdb.py scripts/qemu-gdb: Always do full stack dump for python errors 2025-02-06 13:59:00 +01:00
qemu-plugin-symbols.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
qemu-stamp.py
qemu-trace-stap scripts: improve error from qemu-trace-stap on missing 'stap' 2025-02-12 10:03:18 -05:00
qemu-version.sh
qmp_helper.py scripts/ghes_inject: add a script to generate GHES error inject 2025-10-05 08:17:08 -04:00
qom-cast-macro-clean-cocci-gen.py licenses: Remove SPDX tags not being license identifier for Linaro 2025-01-30 13:01:22 +03:00
rdma-migration-helper.sh qtest/migration/rdma: Add test for rdma migration with ipv6 2025-05-20 11:26:32 -04:00
refresh-pxe-roms.sh
render_block_graph.py python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
replay-dump.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
rust-to-clang-target-test.sh configure: set the bindgen cross target 2025-09-30 19:33:25 +04:00
rust-to-clang-target.sh configure: set the bindgen cross target 2025-09-30 19:33:25 +04:00
shaderinclude.py
signrom.py
simpletrace.py simpletrace: added simplified Analyzer2 class 2023-09-26 12:28:51 -04:00
symlink-install-tree.py scripts/symlink-install-tree.py: Fix MESONINTROSPECT parsing 2024-10-29 15:04:46 +00:00
tracetool.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
u2f-setup-gen.py
undefsym.py
update-linux-headers.sh linux-headers: deal with counted_by annotation 2025-10-04 10:50:37 -04:00
update-mips-syscall-args.sh
update-syscalltbl.sh linux-user,loongarch: move to syscalltbl file 2024-09-22 09:30:18 +02:00
userfaultfd-wrlat.py tests, scripts: Don't import print_function from __future__ 2025-09-16 17:31:53 +01:00
vmstate-static-checker.py scripts/vmstate-static-checker.py: Add new hpet entry for num_timers 2025-05-20 11:26:32 -04:00
xen-detect.c
xml-preprocess-test.py
xml-preprocess.py scripts/xml-preprocess: Make sure this script is invoked via the right Python 2023-10-12 00:37:39 +03:00