All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Shiju Jose <shiju.jose@huawei.com>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	Cleber Rosa <crosa@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [PATCH v11 17/17] scripts/ghes_inject: add a script to generate GHES error inject
Date: Tue, 23 Sep 2025 08:31:22 +0200	[thread overview]
Message-ID: <20250923083122.6b75ae82@foz.lan> (raw)
In-Reply-To: <20250922084417-mutt-send-email-mst@kernel.org>

Em Mon, 22 Sep 2025 08:48:03 -0400
"Michael S. Tsirkin" <mst@redhat.com> escreveu:

> On Fri, Sep 05, 2025 at 05:09:24PM +0200, Mauro Carvalho Chehab wrote:

> > diff --git a/scripts/arm_processor_error.py b/scripts/arm_processor_error.py
> > new file mode 100644
> > index 000000000000..1dd42e42a877
> > --- /dev/null
> > +++ b/scripts/arm_processor_error.py
> > @@ -0,0 +1,476 @@  
> 
> Malformed patch: script only has 474 lines.

Sorry for that. This time I sent the series with a new (not so) shiny 
mailbomb script, I rewrote in Python. It turned to be a big headache to
use python EmailMessage class: it always ended badly encoding something.
It also affected patches I sent to the Kernel, badly handling utf-8 chars
and "\" characters. I gave up on it and I'm reusing my 10+ years old Perl
script again.

Sorry for that.

> > +#!/usr/bin/env python3
> > +#
> > +# pylint: disable=C0301,C0114,R0903,R0912,R0913,R0914,R0915,W0511
> > +# SPDX-License-Identifier: GPL-2.0-or-later
> > +#
> > +# Copyright (C) 2024-2025 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > +
> > +# TODO: current implementation has dummy defaults.
> > +#
> > +# For a better implementation, a QMP addition/call is needed to
> > +# retrieve some data for ARM Processor Error injection:
> > +#
> > +#   - ARM registers: power_state, mpidr.
> > +
> > +"""
> > +Generates an ARM processor error CPER, compatible with  
> 
> Generates -> Generate
> 
> prefer imperative mood
> 
> > +UEFI 2.9A Errata.
> > +
> > +Injecting such errors can be done using:
> > +
> > +    $ ./scripts/ghes_inject.py arm
> > +    Error injected.
> > +
> > +Produces a simple CPER register, as detected on a Linux guest:
> > +
> > +[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
> > +[Hardware Error]: event severity: recoverable
> > +[Hardware Error]:  Error 0, type: recoverable
> > +[Hardware Error]:   section_type: ARM processor error
> > +[Hardware Error]:   MIDR: 0x0000000000000000
> > +[Hardware Error]:   running state: 0x0
> > +[Hardware Error]:   Power State Coordination Interface state: 0
> > +[Hardware Error]:   Error info structure 0:
> > +[Hardware Error]:   num errors: 2
> > +[Hardware Error]:    error_type: 0x02: cache error
> > +[Hardware Error]:    error_info: 0x000000000091000f
> > +[Hardware Error]:     transaction type: Data Access
> > +[Hardware Error]:     cache error, operation type: Data write
> > +[Hardware Error]:     cache level: 2
> > +[Hardware Error]:     processor context not corrupted
> > +[Firmware Warn]: GHES: Unhandled processor error type 0x02: cache error
> > +
> > +The ARM Processor Error message can be customized via command line
> > +parameters. For instance:
> > +
> > +    $ ./scripts/ghes_inject.py arm --mpidr 0x444 --running --affinity 1 +        --error-info 12345678 --vendor 0x13,123,4,5,1 --ctx-array 0,1,2,3,4,5 +        -t cache tlb bus micro-arch tlb,micro-arch  
> 
> Weird formatting. Are these + signs intentional here?
> Oh, maybe that is where the 2 missing lines are hiding.

Nope. Broken mailbomb script: EmailMessage decided to handle itself 
lines ended with "\", even after being asked to parse an e-mail as
binary.

For v12 I'll be using the old script which doesn't corrupt patches.

Thanks,
Mauro


      reply	other threads:[~2025-09-23  6:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 15:09 [PATCH v11 00/17] Change ghes to use HEST-based offsets and add support for error inject Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 01/17] Revert "hw/acpi/ghes: Make ghes_record_cper_errors() static" Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 02/17] acpi/ghes: Cleanup the code which gets ghes ged state Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 03/17] acpi/ghes: prepare to change the way HEST offsets are calculated Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 04/17] acpi/ghes: add a firmware file with HEST address Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 05/17] acpi/ghes: Use HEST table offsets when preparing GHES records Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 06/17] acpi/ghes: don't hard-code the number of sources for HEST table Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 07/17] acpi/ghes: add a notifier to notify when error data is ready Mauro Carvalho Chehab
2025-09-22 19:53   ` Michael S. Tsirkin
2025-09-05 15:09 ` [PATCH v11 08/17] acpi/generic_event_device: Update GHES migration to cover hest addr Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 09/17] acpi/generic_event_device: add logic to detect if HEST addr is available Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 10/17] acpi/generic_event_device: add an APEI error device Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 11/17] tests/acpi: virt: allow acpi table changes at DSDT and HEST tables Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 12/17] arm/virt: Wire up a GED error device for ACPI / GHES Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 13/17] qapi/acpi-hest: add an interface to do generic CPER error injection Mauro Carvalho Chehab
2025-09-22 12:42   ` Michael S. Tsirkin
2025-09-05 15:09 ` [PATCH v11 14/17] acpi/generic_event_device.c: enable use_hest_addr for QEMU 10.x Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 15/17] tests/acpi: virt: update HEST and DSDT tables Mauro Carvalho Chehab
2025-09-22 10:52   ` Michael S. Tsirkin
2025-09-23  6:57     ` Mauro Carvalho Chehab
2025-09-05 15:09 ` [PATCH v11 16/17] docs: hest: add new "etc/acpi_table_hest_addr" and update workflow Mauro Carvalho Chehab
2025-09-22 12:51   ` Michael S. Tsirkin
2025-09-05 15:09 ` [PATCH v11 17/17] scripts/ghes_inject: add a script to generate GHES error inject Mauro Carvalho Chehab
2025-09-22 10:53   ` Michael S. Tsirkin
2025-09-22 12:48   ` Michael S. Tsirkin
2025-09-23  6:31     ` Mauro Carvalho Chehab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250923083122.6b75ae82@foz.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=crosa@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shiju.jose@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.