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

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

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

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

[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

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

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

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

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

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

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

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 3/6] acpi/ghes: rename the function which gets hw error offsets

2024-11-22 Thread Mauro Carvalho Chehab
Em Wed, 20 Nov 2024 14:33:08 + Jonathan Cameron escreveu: > On Wed, 13 Nov 2024 09:37:00 +0100 > Mauro Carvalho Chehab wrote: > > > Rename: get_ghes_offsets->get_hw_error_offsets > > to make clear that this function return offsets based on the > > hardware e

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

2024-11-22 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 | 41

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

2024-11-22 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 v4 04/15] acpi/ghes: better handle source_id and notification

2024-11-22 Thread Mauro Carvalho Chehab
caller function to fill both. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- Chenges from v10: - Some changes got moved to the previous patch. Changes from v8: - Non-rename/cleanup changes merged altogether; - source ID is now more generic, defined per guest target

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

2024-11-22 Thread Mauro Carvalho Chehab
The GHES driver requires not only a HEST table, but also a separate firmware file to store Error Structure records. It can't do one without the other. Simplify the caller logic for it to require one function. No functional changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jon

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

2024-11-22 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 v4 09/15] acpi/ghes: better name GHES memory error function

2024-11-22 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 Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c

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

2024-11-22 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 v4 12/15] acpi/ghes: better name the offset of the hardware error firmware

2024-11-22 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 Reviewed-by: Igor Mammedov

[PATCH v4 14/15] acpi/ghes: Change ghes fill logic to work with only one source

2024-11-22 Thread Mauro Carvalho Chehab
Extending to multiple sources require a BIOS pointer to the beginning of the HEST table, which in turn requires a backward-compatible code. So, the current code supports only one source. Ensure that and simplify the code. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron

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

2024-11-22 Thread Mauro Carvalho Chehab
Em Wed, 20 Nov 2024 14:18:38 + Jonathan Cameron escreveu: > On Tue, 12 Nov 2024 11:14:52 +0100 > Mauro Carvalho Chehab wrote: > > > Split the code into separate functions to allow using the > > common CPER filling code by different error sources. > > > &

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

2024-11-22 Thread Mauro Carvalho Chehab
will be moved to this series: https://lore.kernel.org/qemu-devel/cover.1727782588.git.mchehab+hua...@kernel.org/ v2: - some indentation fixes; - some description improvements; - fixed a badly-solved merge conflict that ended renaming a parameter. Mauro Carvalho Chehab (15): acpi/ghes

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

2024-11-22 Thread Mauro Carvalho Chehab
As described at: ACPI 6.5 spec at: 18.3.2. ACPI Error Source In particular at GHES/GHESv2 table: Table 18.10 Generic Hardware Error Source Structure HEST source ID is actually a 16-bit value. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes

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

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

2024-11-22 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 Reviewed-by: Igor Mammedov --- Changes from v8: - Non-rename/cleanup changes merged

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

2024-11-22 Thread Mauro Carvalho Chehab
described at: ACPI 6.2: 18.3.2.7.1 Generic Error Data The remaining code 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 | 131

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

2024-11-22 Thread Mauro Carvalho Chehab
Make error handling within ghes_record_cper_errors() consistent, i.e. instead abort just print a error in case ghes GED is not found. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw

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

2024-11-22 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 | 38

Re: [PATCH 4/6] acpi/ghes: Use HEST table offsets when preparing GHES records

2024-11-22 Thread Mauro Carvalho Chehab
Em Wed, 20 Nov 2024 14:59:30 + Jonathan Cameron escreveu: > On Wed, 13 Nov 2024 09:37:01 +0100 > Mauro Carvalho Chehab wrote: > > > There are two pointers that are needed during error injection: > > > > 1. The start address of the CPER block to be stored; &g

Re: [PATCH 5/6] acpi/generic_event_device: Update GHES migration to cover hest addr

2024-11-22 Thread Mauro Carvalho Chehab
Em Wed, 20 Nov 2024 15:01:19 + Jonathan Cameron escreveu: > On Wed, 13 Nov 2024 09:37:02 +0100 > Mauro Carvalho Chehab wrote: > > > The GHES migration logic at GED should now support HEST table > > location too. > > > > Increase migration version an

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

2024-11-25 Thread Mauro Carvalho Chehab
Em Fri, 22 Nov 2024 17:19:44 +0100 Igor Mammedov escreveu: > > + > > +if (!physical_address) { > > +error_report("can not find Generic Error Status Block for source > > id %d", > > + source_id); > > isn't it a copy paste error from somewhere, perhaps it's mixed

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

2024-12-03 Thread Mauro Carvalho Chehab
Em Tue, 3 Dec 2024 12:42:32 +0100 Igor Mammedov escreveu: > > +/* > > + * Clear the Read Ack Register, OSPM will write it to 1 when > ^ typo? > > + * it acknowledges this error. > > + */ Yes. I'll add this hunk there:

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

2024-12-03 Thread Mauro Carvalho Chehab
Em Tue, 3 Dec 2024 12:51:43 +0100 Igor Mammedov escreveu: > On Fri, 22 Nov 2024 10:11:30 +0100 > 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 v2 0/5] Change ghes driver to use HEST-based offsets

2024-12-03 Thread Mauro Carvalho Chehab
Em Tue, 3 Dec 2024 13:03:10 +0100 Igor Mammedov escreveu: > On Fri, 22 Nov 2024 14:14:10 +0100 > Mauro Carvalho Chehab wrote: > > > This series was part of the previous PR to add generic error injection > > support on GHES. It depends on a cleanup patch series s

Re: [PATCH v5 13/16] acpi/ghes: better name the offset of the hardware error firmware

2024-12-05 Thread Mauro Carvalho Chehab
Em Thu, 5 Dec 2024 10:22:19 +0100 Igor Mammedov escreveu: > On Thu, 5 Dec 2024 08:59:59 +0100 > Mauro Carvalho Chehab wrote: > > > Em Wed, 4 Dec 2024 17:37:59 +0100 > > Igor Mammedov escreveu: > > > > > On Wed, 4 Dec 2024 08:41:21 +010

Re: [PATCH v5 10/16] acpi/ghes: better name GHES memory error function

2024-12-05 Thread Mauro Carvalho Chehab
Em Wed, 4 Dec 2024 17:40:25 +0100 Igor Mammedov escreveu: > On Wed, 4 Dec 2024 08:41:18 +0100 > Mauro Carvalho Chehab wrote: > > > 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

Re: [PATCH v5 13/16] acpi/ghes: better name the offset of the hardware error firmware

2024-12-05 Thread Mauro Carvalho Chehab
Em Wed, 4 Dec 2024 17:37:59 +0100 Igor Mammedov escreveu: > On Wed, 4 Dec 2024 08:41:21 +0100 > Mauro Carvalho Chehab wrote: > > > The hardware error firmware is where HEST error structures are > ^^^ I can't parse this, suspect you've

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

2024-12-04 Thread Mauro Carvalho Chehab
Em Wed, 4 Dec 2024 08:54:40 +0100 Igor Mammedov escreveu: > On Tue, 3 Dec 2024 14:47:30 +0100 > Mauro Carvalho Chehab wrote: > > > Em Tue, 3 Dec 2024 12:51:43 +0100 > > Igor Mammedov escreveu: > > > > > On Fri, 22 Nov 2024 10:11:30 +010

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

2024-12-04 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 Reviewed-by: Jonathan

[PATCH v3 1/5] acpi/ghes: Prepare to support multiple sources on ghes

2024-12-04 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 | 43 ++-- hw/arm/virt-acpi-build.c | 5 + in

[PATCH v3 4/5] acpi/generic_event_device: Update GHES migration to cover hest addr

2024-12-04 Thread Mauro Carvalho Chehab
The GHES migration logic at GED should now support HEST table location too. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/generic_event_device.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/acpi/generic_event_device.c b

[PATCH v3 2/5] acpi/ghes: add a firmware file with HEST address

2024-12-04 Thread Mauro Carvalho Chehab
Store HEST table address at GPA, placing its content at hest_addr_le variable. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- 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

[PATCH v3 3/5] acpi/ghes: Use HEST table offsets when preparing GHES records

2024-12-04 Thread Mauro Carvalho Chehab
and the type of the HEST error block structures. Yet, keep the old code, as this is needed for migration purposes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 106 - 1 file changed, 96 insertions(+), 10

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

2024-12-04 Thread Mauro Carvalho Chehab
p tp_printk maxcpus=4' --- v3: did some minor cleanups at the code, as suggested by Jonathan Cameron. v2: - some whitespace and comment changes - patch 3/6 (acpi/ghes: rename the function which gets hw error offsets) was merged on the cleanup series. Mauro Carvalho Chehab (5): acp

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

2024-12-04 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 v5 15/16] acpi/ghes: Change ghes fill logic to work with only one source

2024-12-03 Thread Mauro Carvalho Chehab
Extending to multiple sources require a BIOS pointer to the beginning of the HEST table, which in turn requires a backward-compatible code. So, the current code supports only one source. Ensure that and simplify the code. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron

[PATCH v5 05/16] acpi/ghes: Fix acpi_ghes_record_errors() argument

2024-12-03 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 Reviewed-by: Igor Mammedov --- Changes from v8: - Non-rename/cleanup changes merged

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

2024-12-03 Thread Mauro Carvalho Chehab
described at: ACPI 6.2: 18.3.2.7.1 Generic Error Data The remaining code 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 # Conflicts: # roms/edk2 --- hw/acpi/ghes.c

[PATCH v5 14/16] acpi/ghes: move offset calculus to a separate function

2024-12-03 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 | 40

[PATCH v5 13/16] acpi/ghes: better name the offset of the hardware error firmware

2024-12-03 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 Reviewed-by: Igor Mammedov

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

2024-12-03 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 v5 08/16] acpi/ghes: don't check if physical_address is not zero

2024-12-03 Thread Mauro Carvalho Chehab
The 'physical_address' value is a faulty page. As such, 0 is as valid as any other value. Suggested-by: Igor Mammedov Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index edc74c38bf8a..a3

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

2024-12-03 Thread Mauro Carvalho Chehab
caller function to fill both. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- Chenges from v10: - Some changes got moved to the previous patch. Changes from v8: - Non-rename/cleanup changes merged altogether; - source ID is now more generic

[PATCH v5 12/16] acpi/ghes: rename etc/hardware_error file macros

2024-12-03 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 | 38

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

2024-12-03 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 v5 11/16] acpi/ghes: don't crash QEMU if ghes GED is not found

2024-12-03 Thread Mauro Carvalho Chehab
Make error handling within ghes_record_cper_errors() consistent, i.e. instead abort just print a error in case ghes GED is not found. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 5 - 1 file changed, 4 insertions(+), 1

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

2024-12-03 Thread Mauro Carvalho Chehab
l.org/ v2: - some indentation fixes; - some description improvements; - fixed a badly-solved merge conflict that ended renaming a parameter. Mauro Carvalho Chehab (16): acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED acpi/ghes: simplify acpi_ghes_record_errors() code acpi/ghes: simplify th

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

2024-12-03 Thread Mauro Carvalho Chehab
Em Mon, 25 Nov 2024 11:56:43 + Jonathan Cameron escreveu: > On Fri, 22 Nov 2024 10:11:25 +0100 > Mauro Carvalho Chehab wrote: > > > Split the code into separate functions to allow using the > > common CPER filling code by different error sources. > > > &

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

2024-12-03 Thread Mauro Carvalho Chehab
As described at: ACPI 6.5 spec at: 18.3.2. ACPI Error Source In particular at GHES/GHESv2 table: Table 18.10 Generic Hardware Error Source Structure HEST source ID is actually a 16-bit value. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor

[PATCH v5 10/16] acpi/ghes: better name GHES memory error function

2024-12-03 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 Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes-stub.c| 2 +- hw/acpi/ghes.c

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

2024-12-04 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 Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- docs

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

2024-12-04 Thread Mauro Carvalho Chehab
The GHES driver requires not only a HEST table, but also a separate firmware file to store Error Structure records. It can't do one without the other. Simplify the caller logic for it to require one function. No functional changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jon

Re: [PATCH v6 08/16] acpi/ghes: don't check if physical_address is not zero

2024-12-09 Thread Mauro Carvalho Chehab
Em Mon, 9 Dec 2024 11:36:40 + Jonathan Cameron escreveu: > On Sat, 7 Dec 2024 09:54:14 +0100 > Mauro Carvalho Chehab wrote: > > > The 'physical_address' value is a faulty page. As such, 0 is > > as valid as any other value. > Still not sure on wha

<    1   2   3   4   5   6   >