Re: [RFC PATCH 1/1] hw/arm: FW first ARM processor error injection.

2024-06-24 Thread Mauro Carvalho Chehab
Em Fri, 21 Jun 2024 19:33:16 +0100 Jonathan Cameron escreveu: > On Fri, 21 Jun 2024 17:51:15 +0100 > wrote: > > > From: Shiju Jose > Thanks for posting this. > > Given this is going to linux-edac, probably should mention > this is QEMU based error injection. For cross postings > between ke

Re: [PATCH v3 1/7] arm/virt: place power button pin number on a define

2024-08-05 Thread Mauro Carvalho Chehab
Em Mon, 5 Aug 2024 16:04:39 +0200 Igor Mammedov escreveu: > On Thu, 1 Aug 2024 15:15:44 +0200 > Mauro Carvalho Chehab wrote: > > > Em Tue, 30 Jul 2024 13:26:20 +0200 > > Igor Mammedov escreveu: > > > > > On Tue, 30 Jul 2024 09:29:37 +0100 > > >

Re: [PATCH v5 2/7] acpi/generic_event_device: add an APEI error device

2024-08-05 Thread Mauro Carvalho Chehab
Em Mon, 5 Aug 2024 17:39:46 +0100 Jonathan Cameron escreveu: > On Fri, 2 Aug 2024 23:43:57 +0200 > Mauro Carvalho Chehab wrote: > > > Adds a Generic Event Device to handle generic hardware error > > events, supporting General Purpose Event (GPE) as specified at > >

Re: [PATCH v5 3/7] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-08-05 Thread Mauro Carvalho Chehab
Em Mon, 5 Aug 2024 17:54:00 +0100 Jonathan Cameron escreveu: > On Fri, 2 Aug 2024 23:43:58 +0200 > Mauro Carvalho Chehab wrote: > > Do we need to rename this now there is a GED involved? > Is it even technically a GPIO any more? > Spec says in 18.3.2.7 > HW-reduced ACPI

Re: [PATCH v5 4/7] acpi/ghes: Support GPIO error source

2024-08-05 Thread Mauro Carvalho Chehab
Em Mon, 5 Aug 2024 17:56:17 +0100 Jonathan Cameron escreveu: > On Fri, 2 Aug 2024 23:43:59 +0200 > Mauro Carvalho Chehab wrote: > > > From: Jonathan Cameron > > > > Add error notification to GHES v2 using the GPIO source. > > The gpio / external int

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-06 Thread Mauro Carvalho Chehab
Em Tue, 6 Aug 2024 14:51:53 +0200 Igor Mammedov escreveu: > > +{ 'struct': 'CommonPlatformErrorRecord', > > + 'data': { > > > + 'notification-type': 'str', > > this should be source id (type is just impl. detail of how QEMU delivers > event for given source id) > unless there is no pl

Re: [PATCH v5 4/7] acpi/ghes: Support GPIO error source

2024-08-07 Thread Mauro Carvalho Chehab
Em Tue, 6 Aug 2024 11:32:19 +0200 Igor Mammedov escreveu: > > @@ -327,6 +330,9 @@ static void build_ghes_v2(GArray *table_data, int > > source_id, BIOSLinker *linker) > > */ > > build_ghes_hw_error_notification(table_data, ACPI_GHES_NOTIFY_SEA); > > break; > > +ca

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-07 Thread Mauro Carvalho Chehab
Em Tue, 6 Aug 2024 16:31:13 +0200 Igor Mammedov escreveu: > PS: > looking at the code, ACPI_GHES_MAX_RAW_DATA_LENGTH is 1K > and it is the total size of a error block for a error source. > > However acpi_hest_ghes.rst (3) says it should be 4K, > am I mistaken? Maybe Jonathan knows better, but I

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-07 Thread Mauro Carvalho Chehab
Em Wed, 7 Aug 2024 10:34:36 +0100 Jonathan Cameron escreveu: > On Wed, 7 Aug 2024 09:47:50 +0200 > Mauro Carvalho Chehab wrote: > > > Em Tue, 6 Aug 2024 16:31:13 +0200 > > Igor Mammedov escreveu: > > > > > PS: > > > looking at the code, ACPI_G

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-08 Thread Mauro Carvalho Chehab
Em Tue, 6 Aug 2024 16:31:13 +0200 Igor Mammedov escreveu: > > +/* Could also be read back from the error_block_address register */ > > +*error_block_addr = base + > > +ACPI_GHES_ERROR_SOURCE_COUNT * sizeof(uint64_t) + > > +ACPI_GHES_ERROR_SOURCE_COUNT * sizeof(uint64_t) +

[PATCH v6 06/10] acpi/ghes: add support for generic error injection via QAPI

2024-08-08 Thread Mauro Carvalho Chehab
Provide a generic interface for error injection via GHESv2. This patch is co-authored: - original ghes logic to inject a simple ARM record by Shiju Jose; - generic logic to handle block addresses by Jonathan Cameron; - generic GHESv2 error inject by Mauro Carvalho Chehab; Co-authored

[PATCH v6 00/10] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-08 Thread Mauro Carvalho Chehab
efine for generic error GPIO pin; - a couple cleanups at patch 2 removing uneeded else clauses. Jonathan Cameron (1): acpi/ghes: Add support for GED error device Mauro Carvalho Chehab (9): acpi/generic_event_device: add an APEI error device arm/virt: Wire up a GED error device for ACPI /

[PATCH v6 10/10] scripts/arm_processor_error.py: retrieve mpidr if not filled

2024-08-08 Thread Mauro Carvalho Chehab
Add support to retrieve mpidr value via qom-get. Signed-off-by: Mauro Carvalho Chehab --- scripts/arm_processor_error.py | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/scripts/arm_processor_error.py b/scripts/arm_processor_error.py index

[PATCH v6 05/10] acpi/ghes: rework the logic to handle HEST source ID

2024-08-08 Thread Mauro Carvalho Chehab
. Such change was inspired on a patch from Jonathan Cameron splitting the logic to get the CPER address on a separate function, as this will be needed to support generic error injection. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 3 +- hw/acpi/ghes.c | 225

[PATCH v6 03/10] acpi/ghes: Add support for GED error device

2024-08-08 Thread Mauro Carvalho Chehab
OSPM] Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 12 +--- include/hw/acpi/ghes.h | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index 13b105c5d02d..d6cbeed6e3d5 100644 --- a

[PATCH v6 07/10] docs: acpi_hest_ghes: fix documentation for CPER size

2024-08-08 Thread Mauro Carvalho Chehab
While the spec defines a CPER size of 4KiB for each record, currently it is set to 1KiB. Fix the documentation and add a pointer to the macro name there, as this may help to keep it updated. Signed-off-by: Mauro Carvalho Chehab --- docs/specs/acpi_hest_ghes.rst | 6 -- 1 file changed, 4

[PATCH v6 09/10] target/arm: add an experimental mpidr arm cpu property object

2024-08-08 Thread Mauro Carvalho Chehab
it to be queried via QMP using qom-get function. Signed-off-by: Mauro Carvalho Chehab --- target/arm/cpu.c| 1 + target/arm/cpu.h| 1 + target/arm/helper.c | 10 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index

[PATCH v6 02/10] arm/virt: Wire up a GED error device for ACPI / GHES

2024-08-08 Thread Mauro Carvalho Chehab
Adds support to ARM virtualization to allow handling generic error ACPI Event via GED & error source device. It is aligned with Linux Kernel patch: https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@intel.com/ Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jona

[PATCH v6 08/10] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-08 Thread Mauro Carvalho Chehab
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. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS| 3 + qapi

[PATCH v6 04/10] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Mauro Carvalho Chehab
Creates a QMP command to be used for generic ACPI APEI hardware error injection (HEST) via GHESv2. The actual GHES code will be added at the followup patch. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Shiju Jose Reviewed-by: Jonathan Cameron --- MAINTAINERS | 7

[PATCH v6 01/10] acpi/generic_event_device: add an APEI error device

2024-08-08 Thread Mauro Carvalho Chehab
errors to the guest via ACPI APEI Generic Hardware Error Source (GHES). Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/aml-build.c| 10 ++ hw/acpi

[PATCH] arm/virt: place power button pin number on a define

2024-08-08 Thread Mauro Carvalho Chehab
Having magic numbers inside the code is not a good idea, as it is error-prone. So, instead, create a macro with the number definition. Link: https://lore.kernel.org/qemu-devel/CAFEAcA-PYnZ-32MRX+PgvzhnoAV80zBKMYg61j2f=ohagfw...@mail.gmail.com/ Signed-off-by: Mauro Carvalho Chehab Suggested-by

Re: [PATCH v6 00/10] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-08 Thread Mauro Carvalho Chehab
Em Thu, 8 Aug 2024 14:26:26 +0200 Mauro Carvalho Chehab escreveu: > v6: > - PNP0C33 device creation moved to aml-build.c; > - acpi_ghes record functions now use ACPI notify parameter, > instead of source ID; > - the number of source IDs is now automatically calculated; > -

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-08 Thread Mauro Carvalho Chehab
Em Thu, 08 Aug 2024 10:50:33 +0200 Markus Armbruster escreveu: > Mauro Carvalho Chehab writes: > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 98eddf7ae155..655edcb6688c 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -2075,6 +2075,13 @@ F: hw/ac

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-08 Thread Mauro Carvalho Chehab
Em Thu, 8 Aug 2024 10:11:07 +0200 Igor Mammedov escreveu: > On Wed, 7 Aug 2024 15:25:47 +0100 > Jonathan Cameron wrote: > > > On Tue, 6 Aug 2024 16:31:13 +0200 > > Igor Mammedov wrote: > > > > > On Fri, 2 Aug 2024 23:44:01 +020

Re: [PATCH v5 7/7] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-08 Thread Mauro Carvalho Chehab
Em Thu, 8 Aug 2024 16:58:38 -0400 John Snow escreveu: > On Fri, Aug 2, 2024 at 5:44 PM Mauro Carvalho Chehab < > mchehab+hua...@kernel.org> wrote: > > > +#!/usr/bin/env python3 > > +# > > +# pylint: disable=C0301, C0114, R0912, R0913, R0914, R0915, W0511

Re: [PATCH v5 7/7] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-08 Thread Mauro Carvalho Chehab
Em Thu, 8 Aug 2024 17:21:33 -0400 John Snow escreveu: > On Fri, Aug 2, 2024 at 5:44 PM Mauro Carvalho Chehab < > mchehab+hua...@kernel.org> wrote: > > > diff --git a/scripts/qmp_helper.py b/scripts/qmp_helper.py > > new file mode 100644 > > index 000

Re: [PATCH v5 7/7] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-08 Thread Mauro Carvalho Chehab
Em Fri, 9 Aug 2024 00:41:37 +0200 Mauro Carvalho Chehab escreveu: > > You should be able to use e.g. > > > > legacy.py's QEMUMonitorProtocol class for synchronous connections, e.g. > > > > from qemu.qmp.legacy import QEMUMonitorProtocol > >

Re: [PATCH v5 7/7] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-09 Thread Mauro Carvalho Chehab
Em Fri, 9 Aug 2024 08:26:09 +0200 Mauro Carvalho Chehab escreveu: > Em Fri, 9 Aug 2024 00:41:37 +0200 > Mauro Carvalho Chehab escreveu: > > > > You should be able to use e.g. > > > > > > legacy.py's QEMUMonitorProtocol class for synchronous connection

Re: [PATCH v5 7/7] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-09 Thread Mauro Carvalho Chehab
Em Thu, 8 Aug 2024 19:33:32 -0400 John Snow escreveu: > > > Then here you'd use qmp.cmd (raises exception on QMPError) or qmp.cmd_raw > > > or qmp.cmd_obj (returns the QMP response as the return value even if it > > was > > > an error.) > > > > Good to know, I'll try and see what fits best.

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-09 Thread Mauro Carvalho Chehab
Em Thu, 08 Aug 2024 16:45:51 +0200 Markus Armbruster escreveu: > Igor Mammedov writes: > > > On Thu, 8 Aug 2024 16:11:41 +0200 > > Mauro Carvalho Chehab wrote: > > > >> Em Thu, 08 Aug 2024 10:50:33 +0200 > >> Markus Armbruster escreveu: &g

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-13 Thread Mauro Carvalho Chehab
Em Mon, 12 Aug 2024 11:39:00 +0200 Igor Mammedov escreveu: > > We may also store cper_offset there via bios_linker_loader_add_pointer() > > and/or use bios_linker_loader_write_pointer(), but I can't see how the > > data stored there can be retrieved, nor any advantage of using it instead > > of t

Re: [PATCH v6 04/10] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-13 Thread Mauro Carvalho Chehab
Em Mon, 12 Aug 2024 13:57:44 +0200 Igor Mammedov escreveu: > n Platform Error Record - CPER - as defined at the UEFI > > +# specification. See > > +# > > https://uefi.org/specs/UEFI/2.10/Apx_N_Common_Platform_Error_Record.html#record-header > > +# for more details. > > +# > > +# @notification-t

[PATCH v7 09/10] target/arm: add an experimental mpidr arm cpu property object

2024-08-13 Thread Mauro Carvalho Chehab
it to be queried via QMP using qom-get function. Signed-off-by: Mauro Carvalho Chehab --- target/arm/cpu.c| 1 + target/arm/cpu.h| 1 + target/arm/helper.c | 10 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index

[PATCH v7 10/10] scripts/arm_processor_error.py: retrieve mpidr if not filled

2024-08-13 Thread Mauro Carvalho Chehab
Add support to retrieve mpidr value via qom-get. Signed-off-by: Mauro Carvalho Chehab --- scripts/arm_processor_error.py | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/scripts/arm_processor_error.py b/scripts/arm_processor_error.py index

[PATCH v7 07/10] docs: acpi_hest_ghes: fix documentation for CPER size

2024-08-13 Thread Mauro Carvalho Chehab
While the spec defines a CPER size of 4KiB for each record, currently it is set to 1KiB. Fix the documentation and add a pointer to the macro name there, as this may help to keep it updated. Signed-off-by: Mauro Carvalho Chehab Acked-by: Igor Mammedov --- docs/specs/acpi_hest_ghes.rst | 6

[PATCH v7 05/10] acpi/ghes: rework the logic to handle HEST source ID

2024-08-13 Thread Mauro Carvalho Chehab
. Such change was inspired on a patch from Jonathan Cameron splitting the logic to get the CPER address on a separate function, as this will be needed to support generic error injection. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c | 3 +- hw/acpi/ghes.c | 204

[PATCH v7 00/10] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-13 Thread Mauro Carvalho Chehab
ing a define for GPIO power pin; - patch 2 changed to also use a define for generic error GPIO pin; - a couple cleanups at patch 2 removing uneeded else clauses. Jonathan Cameron (1): acpi/ghes: Add support for GED error device Mauro Carvalho Chehab (9): acpi/generic_event_device: add an APEI

[PATCH v7 08/10] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-13 Thread Mauro Carvalho Chehab
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. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS| 3

[PATCH v7 03/10] acpi/ghes: Add support for GED error device

2024-08-13 Thread Mauro Carvalho Chehab
OSPM] Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 12 +--- include/hw/acpi/ghes.h | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index

[PATCH v7 04/10] qapi/acpi-hest: add an interface to do generic CPER error injection

2024-08-13 Thread Mauro Carvalho Chehab
Creates a QMP command to be used for generic ACPI APEI hardware error injection (HEST) via GHESv2. The actual GHES code will be added at the followup patch. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Shiju Jose Reviewed-by: Jonathan Cameron --- MAINTAINERS | 7

[PATCH v7 02/10] arm/virt: Wire up a GED error device for ACPI / GHES

2024-08-13 Thread Mauro Carvalho Chehab
Adds support to ARM virtualization to allow handling generic error ACPI Event via GED & error source device. It is aligned with Linux Kernel patch: https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@intel.com/ Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jona

[PATCH v7 06/10] acpi/ghes: add support for generic error injection via QAPI

2024-08-13 Thread Mauro Carvalho Chehab
Provide a generic interface for error injection via GHESv2. This patch is co-authored: - original ghes logic to inject a simple ARM record by Shiju Jose; - generic logic to handle block addresses by Jonathan Cameron; - generic GHESv2 error inject by Mauro Carvalho Chehab; Co-authored

[PATCH v7 01/10] acpi/generic_event_device: add an APEI error device

2024-08-13 Thread Mauro Carvalho Chehab
errors to the guest via ACPI APEI Generic Hardware Error Source (GHES). Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c| 10

Re: [PATCH v6 00/10] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-13 Thread Mauro Carvalho Chehab
Em Mon, 12 Aug 2024 14:18:35 +0200 Igor Mammedov escreveu: > On Thu, 8 Aug 2024 14:57:35 +0200 > Mauro Carvalho Chehab wrote: > > > Em Thu, 8 Aug 2024 14:26:26 +0200 > > Mauro Carvalho Chehab escreveu: > > > > > v6: > > > - PNP0C33 device cre

Re: [PATCH v7 04/10] qapi/acpi-hest: add an interface to do generic CPER error injection

2024-08-14 Thread Mauro Carvalho Chehab
Em Wed, 14 Aug 2024 14:53:22 +0100 Jonathan Cameron escreveu: > On Wed, 14 Aug 2024 01:23:26 +0200 > Mauro Carvalho Chehab wrote: > > > Creates a QMP command to be used for generic ACPI APEI hardware error > > injection (HEST) via GHESv2. > > > > The actu

Re: [PATCH v7 05/10] acpi/ghes: rework the logic to handle HEST source ID

2024-08-15 Thread Mauro Carvalho Chehab
Em Wed, 14 Aug 2024 01:23:27 +0200 Mauro Carvalho Chehab escreveu: This hunk is wrong: > @@ -350,9 +380,10 @@ static void build_ghes_v2(GArray *table_data, int > source_id, BIOSLinker *linker) > build_append_gas(table_data, AML_AS_SYSTEM_MEMORY, 0x40, 0, >

Re: [PATCH v7 01/10] acpi/generic_event_device: add an APEI error device

2024-08-15 Thread Mauro Carvalho Chehab
Em Wed, 14 Aug 2024 13:33:21 +0100 Jonathan Cameron escreveu: > On Wed, 14 Aug 2024 01:23:23 +0200 > Mauro Carvalho Chehab wrote: > > > Adds a generic error device to handle generic hardware error > > events as specified at ACPI 6.5 specification at 18.3.2.7.2: > >

[PATCH v8 04/13] qapi/acpi-hest: add an interface to do generic CPER error injection

2024-08-16 Thread Mauro Carvalho Chehab
Creates a QMP command to be used for generic ACPI APEI hardware error injection (HEST) via GHESv2. The actual GHES code will be added at the followup patch. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Shiju Jose Reviewed-by: Jonathan Cameron --- MAINTAINERS | 7

[PATCH v8 08/13] docs: acpi_hest_ghes: fix documentation for CPER size

2024-08-16 Thread Mauro Carvalho Chehab
While the spec defines a CPER size of 4KiB for each record, currently it is set to 1KiB. Fix the documentation and add a pointer to the macro name there, as this may help to keep it updated. Signed-off-by: Mauro Carvalho Chehab Acked-by: Igor Mammedov --- docs/specs/acpi_hest_ghes.rst | 6

[PATCH v8 11/13] scripts/arm_processor_error.py: retrieve mpidr if not filled

2024-08-16 Thread Mauro Carvalho Chehab
Add support to retrieve mpidr value via qom-get. Signed-off-by: Mauro Carvalho Chehab --- scripts/arm_processor_error.py | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/scripts/arm_processor_error.py b/scripts/arm_processor_error.py index

[PATCH v8 03/13] acpi/ghes: Add support for GED error device

2024-08-16 Thread Mauro Carvalho Chehab
OSPM] Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 11 +-- include/hw/acpi/ghes.h | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index 13b105c5d02d

[PATCH v8 05/13] acpi/ghes: rework the logic to handle HEST source ID

2024-08-16 Thread Mauro Carvalho Chehab
. Such change was inspired on a patch from Jonathan Cameron splitting the logic to get the CPER address on a separate function, as this will be needed to support generic error injection. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c | 3 +- hw/acpi/ghes.c | 210

[PATCH v8 00/13] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-16 Thread Mauro Carvalho Chehab
00deadbeef [9.374267] Memory failure: 0xdeadb: recovery action for free buddy page: Recovered Such script currently supports arm processor error CPER, but can easily be extended to other GHES notification types. Jonathan Cameron (1): acpi/ghes: Add support for GED error device Mauro Carvalho

[PATCH v8 12/13] acpi/ghes: cleanup generic error data logic

2024-08-16 Thread Mauro Carvalho Chehab
Remove comments that are obvious. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index 4f7b6c5ad2b6..a822a5eafaa0 100644

[PATCH v8 09/13] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-16 Thread Mauro Carvalho Chehab
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. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS| 3

[PATCH v8 07/13] acpi/ghes: cleanup the memory error code logic

2024-08-16 Thread Mauro Carvalho Chehab
Better organize the code of the function, making it to use the raw CPER function, thus removing duplicated code. While here, rename the function to actually reflect what it does. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c | 125

[PATCH v8 02/13] arm/virt: Wire up a GED error device for ACPI / GHES

2024-08-16 Thread Mauro Carvalho Chehab
Adds support to ARM virtualization to allow handling generic error ACPI Event via GED & error source device. It is aligned with Linux Kernel patch: https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@intel.com/ Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jona

[PATCH v8 01/13] acpi/generic_event_device: add an APEI error device

2024-08-16 Thread Mauro Carvalho Chehab
errors to the guest via ACPI APEI Generic Hardware Error Source (GHES). Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c| 10

[PATCH v8 10/13] target/arm: add an experimental mpidr arm cpu property object

2024-08-16 Thread Mauro Carvalho Chehab
it to be queried via QMP using qom-get function. Signed-off-by: Mauro Carvalho Chehab --- target/arm/cpu.c| 1 + target/arm/cpu.h| 1 + target/arm/helper.c | 10 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index

[PATCH v8 13/13] acpi/ghes: check if the BIOS pointers for HEST are correct

2024-08-16 Thread Mauro Carvalho Chehab
The OS kernels navigate between HEST, error source struct and CPER by the usage of some pointers. Double-check if such pointers were properly initializing, ensuring that they match the right address for CPER. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 30

[PATCH v8 06/13] acpi/ghes: add support for generic error injection via QAPI

2024-08-16 Thread Mauro Carvalho Chehab
Provide a generic interface for error injection via GHESv2. This patch is co-authored: - original ghes logic to inject a simple ARM record by Shiju Jose; - generic logic to handle block addresses by Jonathan Cameron; - generic GHESv2 error inject by Mauro Carvalho Chehab; Co-authored

Re: [PATCH v8 03/13] acpi/ghes: Add support for GED error device

2024-08-23 Thread Mauro Carvalho Chehab
Em Mon, 19 Aug 2024 13:43:04 +0200 Igor Mammedov escreveu: > On Fri, 16 Aug 2024 09:37:35 +0200 > Mauro Carvalho Chehab wrote: > > > From: Jonathan Cameron > > > > As a GED error device is now defined, add another type > > of notification. > > >

Re: [PATCH v8 13/13] acpi/ghes: check if the BIOS pointers for HEST are correct

2024-08-23 Thread Mauro Carvalho Chehab
Em Mon, 19 Aug 2024 16:07:33 +0200 Igor Mammedov escreveu: > > +err_source_struct = le64_to_cpu(ags->hest_addr_le) + > > +source * HEST_GHES_V2_TABLE_SIZE; > > there is no guaranties that HEST table will contain only GHESv2 sources, > and once such is added this pla

Re: [PATCH v8 05/13] acpi/ghes: rework the logic to handle HEST source ID

2024-08-24 Thread Mauro Carvalho Chehab
Em Mon, 19 Aug 2024 14:10:37 +0200 Igor Mammedov escreveu: > On Fri, 16 Aug 2024 09:37:37 +0200 > Mauro Carvalho Chehab wrote: > > > The current logic is based on a lot of duct tape, with > > offsets calculated based on one define with the number of > > source IDs an

Re: [PATCH v8 06/13] acpi/ghes: add support for generic error injection via QAPI

2024-08-24 Thread Mauro Carvalho Chehab
Em Mon, 19 Aug 2024 14:51:36 +0200 Igor Mammedov escreveu: > > +read_ack = 1; > > +cpu_physical_memory_write(read_ack_start_addr, > > + &read_ack, (uint64_t)); > we don't do this for SEV so, why are you setting it to 1 here? According with: http

[PATCH v9 11/12] target/arm: add an experimental mpidr arm cpu property object

2024-08-24 Thread Mauro Carvalho Chehab
it to be queried via QMP using qom-get function. Signed-off-by: Mauro Carvalho Chehab --- target/arm/cpu.c| 1 + target/arm/cpu.h| 1 + target/arm/helper.c | 10 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index

[PATCH v9 07/12] arm/virt: Wire up a GED error device for ACPI / GHES

2024-08-24 Thread Mauro Carvalho Chehab
Adds support to ARM virtualization to allow handling generic error ACPI Event via GED & error source device. It is aligned with Linux Kernel patch: https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@intel.com/ Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jona

[PATCH v9 10/12] scripts/ghes_inject: add a script to generate GHES error inject

2024-08-24 Thread Mauro Carvalho Chehab
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. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS| 3

[PATCH v9 05/12] acpi/ghes: add a notifier to notify when error data is ready

2024-08-24 Thread Mauro Carvalho Chehab
Some error injection notify methods are async, like GPIO notify. Add a notifier to be used when the error record is ready to be sent to the guest OS. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 5 + include/hw/acpi/ghes.h | 3 +++ 2 files changed, 8 insertions(+) diff

[PATCH v9 03/12] acpi/ghes: rename etc/hardware_error file macros

2024-08-24 Thread Mauro Carvalho Chehab
Now that we have also have a file to store HEST data location, which is part of GHES, better name the file where CPER records are stored. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions

[PATCH v9 00/12] Add ACPI CPER firmware first error injection on ARM emulation

2024-08-24 Thread Mauro Carvalho Chehab
types. Mauro Carvalho Chehab (12): acpi/ghes: add a firmware file with HEST address acpi/ghes: rework the logic to handle HEST source ID acpi/ghes: rename etc/hardware_error file macros acpi/ghes: better name GHES memory error function acpi/ghes: add a notifier to notify when error data is

[PATCH v9 08/12] qapi/acpi-hest: add an interface to do generic CPER error injection

2024-08-24 Thread Mauro Carvalho Chehab
Carvalho Chehab; Co-authored-by: Jonathan Cameron Co-authored-by: Shiju Jose Co-authored-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Signed-off-by: Shiju Jose Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS | 7 +++ hw/acpi/Kconfig | 5

[PATCH v9 09/12] docs: acpi_hest_ghes: fix documentation for CPER size

2024-08-24 Thread Mauro Carvalho Chehab
While the spec defines a CPER size of 4KiB for each record, currently it is set to 1KiB. Fix the documentation and add a pointer to the macro name there, as this may help to keep it updated. Signed-off-by: Mauro Carvalho Chehab Acked-by: Igor Mammedov --- docs/specs/acpi_hest_ghes.rst | 6

[PATCH v9 02/12] acpi/ghes: rework the logic to handle HEST source ID

2024-08-24 Thread Mauro Carvalho Chehab
. Such change was inspired on a patch from Jonathan Cameron splitting the logic to get the CPER address on a separate function, as this will be needed to support generic error injection. Signed-off-by: Mauro Carvalho Chehab --- Changes from v8: - Non-rename/cleanup changes merged altogether

[PATCH v9 04/12] acpi/ghes: better name GHES memory error function

2024-08-24 Thread Mauro Carvalho Chehab
The current function used to generate GHES data is specific for memory errors. Give a better name for it, as we now have a generic function as well. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c | 2 +- include/hw/acpi/ghes.h | 4 ++-- target/arm

Re: [PATCH v8 13/13] acpi/ghes: check if the BIOS pointers for HEST are correct

2024-08-24 Thread Mauro Carvalho Chehab
Em Sat, 24 Aug 2024 02:15:10 +0200 Mauro Carvalho Chehab escreveu: > Ok, we could still do something like this pseudo-code to get the > error source offset: > > #define ACPI_HEST_TYPE_GHESV2 11 > > err_struct_offset = 0; > for (i = 0; i

[PATCH v9 01/12] acpi/ghes: add a firmware file with HEST address

2024-08-24 Thread Mauro Carvalho Chehab
Store HEST table address at GPA, placing its content at hest_addr_le variable. Signed-off-by: Mauro Carvalho Chehab --- Change from v8: - hest_addr_lr is now pointing to the error source size and data. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 15

[PATCH v9 12/12] scripts/arm_processor_error.py: retrieve mpidr if not filled

2024-08-24 Thread Mauro Carvalho Chehab
Add support to retrieve mpidr value via qom-get. Signed-off-by: Mauro Carvalho Chehab --- scripts/arm_processor_error.py | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/scripts/arm_processor_error.py b/scripts/arm_processor_error.py index

[PATCH v9 06/12] acpi/generic_event_device: add an APEI error device

2024-08-24 Thread Mauro Carvalho Chehab
errors to the guest via ACPI APEI Generic Hardware Error Source (GHES). Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c| 10

Re: [PATCH v9 11/12] target/arm: add an experimental mpidr arm cpu property object

2024-08-25 Thread Mauro Carvalho Chehab
Em Sun, 25 Aug 2024 12:34:14 +0100 Peter Maydell escreveu: > On Sun, 25 Aug 2024 at 04:46, Mauro Carvalho Chehab > wrote: > > > > Accurately injecting an ARM Processor error ACPI/APEI GHES > > error record requires the value of the ARM Multiprocessor > > Affinity R

Re: [PATCH v9 11/12] target/arm: add an experimental mpidr arm cpu property object

2024-08-31 Thread Mauro Carvalho Chehab
Em Fri, 30 Aug 2024 17:27:27 +0100 Peter Maydell escreveu: > On Mon, 26 Aug 2024 at 04:12, Mauro Carvalho Chehab > wrote: > > > > Em Sun, 25 Aug 2024 12:34:14 +0100 > > Peter Maydell escreveu: > > > > > On Sun, 25 Aug 2024 at 04

Re: [PATCH v8 06/13] acpi/ghes: add support for generic error injection via QAPI

2024-09-12 Thread Mauro Carvalho Chehab
Em Thu, 12 Sep 2024 14:42:33 +0200 Igor Mammedov escreveu: > On Wed, 11 Sep 2024 16:34:36 +0100 > Jonathan Cameron wrote: > > > On Wed, 11 Sep 2024 15:21:32 +0200 > > Igor Mammedov wrote: > > > > > On Sun, 25 Aug 2024 05:29:23 +0200 > > > Mauro Ca

Re: [PATCH v9 01/12] acpi/ghes: add a firmware file with HEST address

2024-09-12 Thread Mauro Carvalho Chehab
Em Wed, 11 Sep 2024 15:51:08 +0200 Igor Mammedov escreveu: > On Sun, 25 Aug 2024 05:45:56 +0200 > Mauro Carvalho Chehab wrote: > > > Store HEST table address at GPA, placing its content at > > hest_addr_le variable. > > > > Signed-off-by: Mauro Carvalho Che

Re: [PATCH v9 02/12] acpi/ghes: rework the logic to handle HEST source ID

2024-09-13 Thread Mauro Carvalho Chehab
Em Wed, 11 Sep 2024 17:01:57 +0200 Igor Mammedov escreveu: > On Sun, 25 Aug 2024 05:45:57 +0200 > Mauro Carvalho Chehab wrote: > > > The current logic is based on a lot of duct tape, with > > offsets calculated based on one define with the number of > > source IDs an

Re: [PATCH v9 01/12] acpi/ghes: add a firmware file with HEST address

2024-09-13 Thread Mauro Carvalho Chehab
my taste. So, IMO it is a lot safer to not support migrations from v1 (only ghes_addr_le), using a patch like the enclosed one to ensure that. Btw, checking existing migration structs, it sounds that for almost all structures, .version_id is identical to .minimum_version_id, meaning that migrati

Re: [PATCH v8 06/13] acpi/ghes: add support for generic error injection via QAPI

2024-09-13 Thread Mauro Carvalho Chehab
Em Fri, 13 Sep 2024 14:28:02 +0200 Igor Mammedov escreveu: > > > 5. Just return an error code without doing any resets. To me, this is > > >the worse scenario. > > > > > > I don't like (5), as if something bad happens, there's nothing to be > > > done. > > > > If it happens on a real s

[PATCH v10 20/21] target/arm: add an experimental mpidr arm cpu property object

2024-09-13 Thread Mauro Carvalho Chehab
it to be queried via QMP using qom-get function. Signed-off-by: Mauro Carvalho Chehab --- target/arm/cpu.c| 1 + target/arm/cpu.h| 1 + target/arm/helper.c | 10 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index

[PATCH v10 14/21] acpi/ghes: add a notifier to notify when error data is ready

2024-09-13 Thread Mauro Carvalho Chehab
Some error injection notify methods are async, like GPIO notify. Add a notifier to be used when the error record is ready to be sent to the guest OS. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 5 + include/hw/acpi/ghes.h | 3 +++ 2 files changed, 8 insertions(+) diff

[PATCH v10 02/21] acpi/generic_event_device: Update GHES migration to cover hest addr

2024-09-13 Thread Mauro Carvalho Chehab
The GHES migration logic at GED should now support HEST table location too. Increase migration version and change needed to check for both ghes_addr_le and hest_addr_le. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/generic_event_device.c | 11 ++- 1 file changed, 6 insertions(+), 5

[PATCH v10 16/21] arm/virt: Wire up a GED error device for ACPI / GHES

2024-09-13 Thread Mauro Carvalho Chehab
Adds support to ARM virtualization to allow handling generic error ACPI Event via GED & error source device. It is aligned with Linux Kernel patch: https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@intel.com/ Co-authored-by: Mauro Carvalho Chehab Co-authored-by: Jona

[PATCH v10 09/21] acpi/ghes: Don't hardcode the number of sources on ghes

2024-09-13 Thread Mauro Carvalho Chehab
The number of sources is architecture-dependent. Usually, architectures will implement one synchronous and/or one asynchronous source. Change the logic to better cope with such model. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 53

[PATCH v10 07/21] acpi/ghes: rework the logic to handle HEST source ID

2024-09-13 Thread Mauro Carvalho Chehab
. Such change was inspired on a patch from Jonathan Cameron splitting the logic to get the CPER address on a separate function, as this will be needed to support generic error injection. Signed-off-by: Mauro Carvalho Chehab --- Changes from v9: - patch split on multiple patches to avoid multiple

[PATCH v10 08/21] acpi/ghes: Change the type for source_id

2024-09-13 Thread Mauro Carvalho Chehab
HEST source ID is actually a 16-bit value. Yet, make it a little bit more generic using just an integer type. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c | 2 +- include/hw/acpi/ghes.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions

[PATCH v10 03/21] acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED

2024-09-13 Thread Mauro Carvalho Chehab
This is just duplicating ACPI_GHES_ERROR_SOURCE_COUNT, which has a better name. So, drop the duplication. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 7 ++- include/hw/acpi/ghes.h | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/acpi/ghes.c b

[PATCH v10 01/21] acpi/ghes: add a firmware file with HEST address

2024-09-13 Thread Mauro Carvalho Chehab
Store HEST table address at GPA, placing its content at hest_addr_le variable. Signed-off-by: Mauro Carvalho Chehab --- Change from v8: - hest_addr_lr is now pointing to the error source size and data. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 15

[PATCH v10 11/21] acpi/ghes: don't crash QEMU if ghes GED is not found

2024-09-13 Thread Mauro Carvalho Chehab
Instead, produce an error and continue working Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index f54865423f69..e47c0238f3c5 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c

[PATCH v10 19/21] scripts/ghes_inject: add a script to generate GHES error inject

2024-09-13 Thread Mauro Carvalho Chehab
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. Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS| 3

[PATCH v10 05/21] acpi/ghes: better handle source_id and notification

2024-09-13 Thread Mauro Carvalho Chehab
() function is now an internal function. Signed-off-by: Mauro Carvalho Chehab --- Changes from v8: - Non-rename/cleanup changes merged altogether; - source ID is now more generic, defined per guest target. That should make easier to add support for 86. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi

[PATCH v10 17/21] qapi/acpi-hest: add an interface to do generic CPER error injection

2024-09-13 Thread Mauro Carvalho Chehab
Carvalho Chehab; Co-authored-by: Jonathan Cameron Co-authored-by: Shiju Jose Co-authored-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Signed-off-by: Shiju Jose Signed-off-by: Mauro Carvalho Chehab --- Changes since v9: - ARM source IDs renamed to reflect SYNC/ASYNC; - command

  1   2   3   4   5   6   >