Re: [PATCH 14/15] better name the offset of the hardware error firmware

2024-10-01 Thread Mauro Carvalho Chehab
Em Thu, 26 Sep 2024 13:12:25 +0100 Jonathan Cameron escreveu: > On Wed, 25 Sep 2024 06:04:19 +0200 > Mauro Carvalho Chehab wrote: > > > The hardware error firmware is where HEST error structures are > > stored. Those can be GHESv2, but they can also be other types. >

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

2024-10-01 Thread Mauro Carvalho Chehab
Em Tue, 17 Sep 2024 13:59:34 +0200 Igor Mammedov escreveu: > On Sat, 14 Sep 2024 08:13:28 +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

[PATCH v2 09/15] acpi/ghes: make the GHES record generation more generic

2024-10-01 Thread Mauro Carvalho Chehab
to generate a memory error now belongs to acpi_ghes_record_errors() function. A further patch will give it a better name. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 118 + include/hw/acpi/ghes.h | 3 ++ 2 files changed, 74

[PATCH v2 04/15] acpi/ghes: better handle source_id and notification

2024-10-01 Thread Mauro Carvalho Chehab
implemented hardware report mechanisms. Cleanup the logic to fill those, as they should be handled independently. This is a preparation for a future patch that will shift those fields to the HEST init function call. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- Chenges from

[PATCH v2 07/15] acpi/ghes: Change the type for source_id

2024-10-01 Thread Mauro Carvalho Chehab
HEST source ID is actually a 16-bit value Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c | 2 +- include/hw/acpi/ghes.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/acpi/ghes-stub.c b/hw

[PATCH v2 10/15] acpi/ghes: move offset calculus to a separate function

2024-10-01 Thread Mauro Carvalho Chehab
, in preparation for a patch that will be changing the logic to calculate it from the HEST table. While here, properly name the variable which stores the cper address. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 50

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

2024-10-01 Thread Mauro Carvalho Chehab
Em Mon, 16 Sep 2024 13:05:06 +0200 Igor Mammedov escreveu: > > But no idea how to start a machine using a saved state. > > see https://www.linux-kvm.org/page/Migration > 'savevm/loadvm to an external state file (using pseudo-migration)' section > It didn't work. Is migration currently workin

[PATCH v2 15/15] docs: acpi_hest_ghes: fix documentation for CPER size

2024-10-01 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 Reviewed-by: Jonathan Cameron --- docs

[PATCH v2 11/15] acpi/ghes: better name GHES memory error function

2024-10-01 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. Reviewed-by: Igor Mammedov Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c | 2 +- include/hw/acpi

[PATCH v2 06/15] acpi/ghes: Remove a duplicated out of bounds check

2024-10-01 Thread Mauro Carvalho Chehab
acpi_ghes_record_errors() has an assert() at the beginning to ensure that source_id will be lower than ACPI_GHES_ERROR_SOURCE_COUNT. Remove a duplicated check. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 4 +--- 1 file

[PATCH v2 05/15] acpi/ghes: Fix acpi_ghes_record_errors() argument

2024-10-01 Thread Mauro Carvalho Chehab
Align the header file with the actual implementation of this function, as the first argument is source ID and not notification type. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- Changes from v8: - Non-rename/cleanup changes merged altogether; - source ID is now more

[PATCH v2 08/15] acpi/ghes: Prepare to support multiple sources on ghes

2024-10-01 Thread Mauro Carvalho Chehab
add a HEST table bios pointer and change the logic at acpi_ghes_record_errors() to dynamically use the new size. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 65 hw/arm/virt-acpi-build.c | 5 inclu

[PATCH v2 14/15] acpi/ghes: better name the offset of the hardware error firmware

2024-10-01 Thread Mauro Carvalho Chehab
The hardware error firmware is where HEST error structures are stored. Those can be GHESv2, but they can also be other types. Better name the location of the hardware error. No functional changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi

[PATCH v2 12/15] acpi/ghes: don't crash QEMU if ghes GED is not found

2024-10-01 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 3af1cd16d4d7..209095f67e9a 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c

[PATCH v2 00/15] Prepare GHES driver to support error injection

2024-10-01 Thread Mauro Carvalho Chehab
ended renaming a parameter. Mauro Carvalho Chehab (15): acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED acpi/ghes: simplify acpi_ghes_record_errors() code acpi/ghes: simplify the per-arch caller to build HEST table acpi/ghes: better handle source_id and notification acpi/ghes

[PATCH v2 03/15] acpi/ghes: simplify the per-arch caller to build HEST table

2024-10-01 Thread Mauro Carvalho Chehab
more generic. No functional changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- Changes from v10: - Removed the logic which associates notification and source ID. This will be placed on a separate patch. Changes from v8: - Non-rename/cleanup changes merged altog

[PATCH v2 13/15] acpi/ghes: rename etc/hardware_error file macros

2024-10-01 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 Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 32

[PATCH v2 02/15] acpi/ghes: simplify acpi_ghes_record_errors() code

2024-10-01 Thread Mauro Carvalho Chehab
Reduce the ident of the function and prepares it for the next changes. No functional changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 56 ++ 1 file changed, 29

[PATCH v2 01/15] acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED

2024-10-01 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 Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 7 ++- include/hw/acpi/ghes.h | 3 ++- 2 files changed, 4

[PATCH RFC 4/5] acpi/generic_event_device: add logic to detect if HEST addr is available

2024-10-01 Thread Mauro Carvalho Chehab
Create a new property (x-has-hest-addr) and use it to detect if the GHES table offsets can be calculated from the HEST address (qemu 9.2 and upper) or via the legacy way via an offset obtained from the hardware_errors firmware file. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi

[PATCH RFC 0/5] Change ghes driver to use HEST-based offsets

2024-10-01 Thread Mauro Carvalho Chehab
Invalid argument Yet, running virt-9.1 used the old math code (offsets from hardware_errors firmware file) while running virt-9.2 executed the new math code using HEST address. Mauro Carvalho Chehab (5): acpi/ghes: add a firmware file with HEST address acpi/ghes: Use HEST table offsets when

[PATCH RFC 1/5] acpi/ghes: add a firmware file with HEST address

2024-10-01 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 RFC 2/5] acpi/ghes: Use HEST table offsets when preparing GHES records

2024-10-01 Thread Mauro Carvalho Chehab
the type of HEST error block structures. Yet, keep the old code, as this is needed for migration purposes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 93 -- 1 file changed, 83 insertions(+), 10 deletions(-) diff --git a/hw/acpi

[PATCH RFC 3/5] acpi/generic_event_device: Update GHES migration to cover hest addr

2024-10-01 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 | 29 + 1 file changed

[PATCH RFC 5/5] arm/virt-acpi-build: Properly handle virt-9.1

2024-10-01 Thread Mauro Carvalho Chehab
A virt-9.1 machine can have only one source ID. Signed-off-by: Mauro Carvalho Chehab --- hw/arm/virt-acpi-build.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 476c365851c4

Re: [PATCH 10/15] acpi/ghes: move offset calculus to a separate function

2024-10-01 Thread Mauro Carvalho Chehab
Em Thu, 26 Sep 2024 13:03:48 +0100 Jonathan Cameron escreveu: > On Wed, 25 Sep 2024 06:04:15 +0200 > Mauro Carvalho Chehab wrote: > > > Currently, CPER address location is calculated as an offset of > > the hardware_errors table. It is also badly named, as the > >

Re: [PATCH 08/15] acpi/ghes: Prepare to support multiple sources on ghes

2024-10-01 Thread Mauro Carvalho Chehab
Em Wed, 25 Sep 2024 15:23:33 +0100 Jonathan Cameron escreveu: > On Wed, 25 Sep 2024 06:04:13 +0200 > Mauro Carvalho Chehab wrote: > > > The current code is actually dependent on having just one > > error structure with a single source. > > > > As the number of

Re: [PATCH 12/15] acpi/ghes: don't crash QEMU if ghes GED is not found

2024-09-26 Thread Mauro Carvalho Chehab
Em Thu, 26 Sep 2024 13:09:09 +0100 Jonathan Cameron escreveu: > On Wed, 25 Sep 2024 06:04:17 +0200 > Mauro Carvalho Chehab wrote: > > > Instead, produce an error and continue working > > > > Signed-off-by: Mauro Carvalho Chehab > Make sense as defense in depth

Re: [PATCH 09/15] acpi/ghes: make the GHES record generation more generic

2024-09-26 Thread Mauro Carvalho Chehab
Em Thu, 26 Sep 2024 13:00:56 +0100 Jonathan Cameron escreveu: > On Wed, 25 Sep 2024 06:04:14 +0200 > Mauro Carvalho Chehab wrote: > > > Split the code into separate functions to allow using the > > common CPER filling code by different error sources. > > > &

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

2024-09-25 Thread Mauro Carvalho Chehab
Em Tue, 17 Sep 2024 11:22:31 -0400 Peter Xu escreveu: > On Tue, Sep 17, 2024 at 11:19:21AM +0200, Igor Mammedov wrote: > > On Sat, 14 Sep 2024 08:13:23 +0200 > > Mauro Carvalho Chehab wrote: > > > > what I would do: > > add ghes_needed_v2(): r

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

2024-09-25 Thread Mauro Carvalho Chehab
Em Tue, 17 Sep 2024 14:01:46 +0200 Igor Mammedov escreveu: > > @@ -354,13 +355,13 @@ static const VMStateDescription vmstate_ghes = { > > static bool ghes_needed(void *opaque) > > { > > AcpiGedState *s = opaque; > > -return s->ghes_state.ghes_addr_le; > ^^

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

2024-09-24 Thread Mauro Carvalho Chehab
Em Tue, 24 Sep 2024 15:14:29 +0200 Igor Mammedov escreveu: > > 1) preparation patches: ... > > 69850f550f99 acpi/generic_event_device: add an APEI error device > this one doesn't belong to clean ups, I think. > Lets move this to #3 part Ok. > > The migration logic will require some time, and

[PATCH 12/15] acpi/ghes: don't crash QEMU if ghes GED is not found

2024-09-24 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 3af1cd16d4d7..209095f67e9a 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c

[PATCH 02/15] acpi/ghes: simplify acpi_ghes_record_errors() code

2024-09-24 Thread Mauro Carvalho Chehab
Reduce the ident of the function and prepares it for the next changes. No functional changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 56 ++ 1 file changed, 29 insertions(+), 27 deletions(-) diff

[PATCH 14/15] better name the offset of the hardware error firmware

2024-09-24 Thread Mauro Carvalho Chehab
The hardware error firmware is where HEST error structures are stored. Those can be GHESv2, but they can also be other types. Better name the location of the hardware error. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/generic_event_device.c | 4 ++-- hw/acpi/ghes.c

[PATCH 10/15] acpi/ghes: move offset calculus to a separate function

2024-09-24 Thread Mauro Carvalho Chehab
, in preparation for a patch that will be changing the logic to calculate it from the HEST table. While here, properly name the variable which stores the cper address. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 52 +++--- 1 file changed, 32

[PATCH 04/15] acpi/ghes: better handle source_id and notification

2024-09-24 Thread Mauro Carvalho Chehab
implemented hardware report mechanisms. Cleanup the logic to fill those, as they should be handled independently. This is a preparation for a future patch that will shift those fields to the HEST init function call. Signed-off-by: Mauro Carvalho Chehab --- Chenges from v10: - Some changes got moved

[PATCH 15/15] docs: acpi_hest_ghes: fix documentation for CPER size

2024-09-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 05/15] acpi/ghes: Fix acpi_ghes_record_errors() argument

2024-09-24 Thread Mauro Carvalho Chehab
The first argument is source ID and not notification type. 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

[PATCH 13/15] acpi/ghes: rename etc/hardware_error file macros

2024-09-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. Reviewed-by: Igor Mammedov Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 32 +++- 1 file

[PATCH 08/15] acpi/ghes: Prepare to support multiple sources on ghes

2024-09-24 Thread Mauro Carvalho Chehab
add a HEST table bios pointer and change the logic at acpi_ghes_record_errors() to dynamically use the new size. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 65 hw/arm/virt-acpi-build.c | 5 include/hw/acpi/ghes.h

[PATCH 09/15] acpi/ghes: make the GHES record generation more generic

2024-09-24 Thread Mauro Carvalho Chehab
to generate a memory error now belongs to acpi_ghes_record_errors() function. A further patch will give it a better name. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 118 + include/hw/acpi/ghes.h | 3 ++ 2 files changed, 74

[PATCH 07/15] acpi/ghes: Change the type for source_id

2024-09-24 Thread Mauro Carvalho Chehab
HEST source ID is actually a 16-bit value 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(-) diff --git a/hw/acpi/ghes-stub.c b/hw/acpi/ghes-stub.c index

[PATCH 03/15] acpi/ghes: simplify the per-arch caller to build HEST table

2024-09-24 Thread Mauro Carvalho Chehab
more generic. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- Changes from v10: - Removed the logic which associates notification and source ID. This will be placed on a separate patch. Changes from v8: - Non-rename/cleanup changes merged altogether; - source ID is now more ge

[PATCH 06/15] acpi/ghes: Remove a duplicated out of bounds check

2024-09-24 Thread Mauro Carvalho Chehab
acpi_ghes_record_errors() has an assert() at the beginning to ensure that source_id will be lower than ACPI_GHES_ERROR_SOURCE_COUNT. Remove a duplicated check. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 11/15] acpi/ghes: better name GHES memory error function

2024-09-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. Reviewed-by: Igor Mammedov Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c | 2 +- include/hw/acpi

[PATCH 00/15] Prepare GHES driver to support error injection

2024-09-24 Thread Mauro Carvalho Chehab
such preparation patches. The next series will contain the shift to use offsets from the location of the HEST table, together with a migration logic to make it compatible with 9.1. Mauro Carvalho Chehab (15): acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED acpi/ghes: sim

[PATCH 01/15] acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED

2024-09-24 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 Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 7 ++- include/hw/acpi/ghes.h | 3 ++- 2 files changed, 4 insertions(+), 6 deletions

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

2024-09-24 Thread Mauro Carvalho Chehab
Em Tue, 17 Sep 2024 14:15:19 +0200 Igor Mammedov escreveu: > I'm done with this round of review. > > Given that the series accumulated a bunch of cleanups, > I'd suggest to move all cleanups/renamings not related > to new HEST lookup and new src id mapping to the beginning > of the series, so on

[PATCH v10 21/21] scripts/arm_processor_error.py: retrieve mpidr if not filled

2024-09-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 v10 18/21] docs: acpi_hest_ghes: fix documentation for CPER size

2024-09-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 v10 00/21] Add ACPI CPER firmware first error injection on ARM emulation

2024-09-13 Thread Mauro Carvalho Chehab
asily be extended to other GHES notification types. Mauro Carvalho Chehab (21): acpi/ghes: add a firmware file with HEST address acpi/generic_event_device: Update GHES migration to cover hest addr acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED acpi/ghes: simplify acpi_ghes_record_errors()

[PATCH v10 15/21] acpi/generic_event_device: add an APEI error device

2024-09-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

[PATCH v10 04/21] acpi/ghes: simplify acpi_ghes_record_errors() code

2024-09-13 Thread Mauro Carvalho Chehab
if physical_address is not defined, just return with an error set. That reduces the ident of the function and prepares it for the next changes. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 56 ++ 1 file

[PATCH v10 06/21] acpi/ghes: Remove a duplicated out of bounds check

2024-09-13 Thread Mauro Carvalho Chehab
acpi_ghes_record_errors() has an assert() at the beginning to ensure that source_id will be lower than ACPI_GHES_ERROR_SOURCE_COUNT. Remove a duplicated check. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/acpi

[PATCH v10 13/21] acpi/ghes: better name GHES memory error function

2024-09-13 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. Reviewed-by: Igor Mammedov Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c | 2 +- include/hw/acpi

[PATCH v10 12/21] acpi/ghes: rename etc/hardware_error file macros

2024-09-13 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. Reviewed-by: Igor Mammedov Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 32 +++- 1 file

[PATCH v10 10/21] acpi/ghes: make the GHES record generation more generic

2024-09-13 Thread Mauro Carvalho Chehab
to generate a memory error now belongs to acpi_ghes_record_errors() function. A further patch will give it a better name. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 101 ++--- 1 file changed, 63 insertions(+), 38 deletions(-) diff --git

[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

[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 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 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 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 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 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 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 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 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 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

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

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 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-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 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 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 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

[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

[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 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

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 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

[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 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 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 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 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 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 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 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 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

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

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 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 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. > > >

[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

[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 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

  1   2   3   >