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

2025-01-29 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 v2 05/13] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-01-29 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 Reviewed-by: Igor Mammedov --- hw/acpi/generic_event_device.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw

[PATCH v2 01/13] acpi/ghes: Prepare to support multiple sources on ghes

2025-01-29 Thread Mauro Carvalho Chehab
inter 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 | 47 +--- hw/arm/virt-acpi-build.c | 5 + include/hw/acpi/ghes.h

[PATCH v2 00/13] Change ghes to use HEST-based offsets and add support for error inject

2025-01-29 Thread Mauro Carvalho Chehab
rget happy. (two patches: first one whitelisting such tables; second one removing from whitelist and updating/adding such tables to tests/data/acpi) I'm enclosing a diff from v1 at the end, as it may help check the differences. Mauro Carvalho Chehab (13): acpi/ghes: Prepare to support m

[PATCH v2 04/13] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-01-29 Thread Mauro Carvalho Chehab
structures. Yet, keep the old code, as this is needed for migration purposes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 111 - 1 file changed, 101 insertions(+), 10 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index

[PATCH v2 06/13] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-01-29 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 10.0 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 v2 02/13] tests/acpi: virt: allow acpi table changes for a new table: HEST

2025-01-29 Thread Mauro Carvalho Chehab
The DSDT table will also be affected by such change. Signed-off-by: Mauro Carvalho Chehab --- tests/data/acpi/aarch64/virt/HEST | 0 tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 tests/data/acpi/aarch64/virt/HEST diff --git a

[PATCH v2 12/13] tests/acpi: virt: add a HEST table to aarch64 virt and update DSDT

2025-01-29 Thread Mauro Carvalho Chehab
08 008h] Read Ack Preserve : FFFFFFFE [0D8h 0216 008h] Read Ack Write : 0001 Signed-off-by: Mauro Carvalho Chehab --- tests/data/acpi/aarch64/virt/DSDT | Bin 5196 -> 5240 bytes .../data/acpi/aarch64/virt/DSDT.acpihmatvirt | Bin 5282 ->

[PATCH v2 03/13] acpi/ghes: add a firmware file with HEST address

2025-01-29 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 While here, capitalize first letter on a comment about hardware_error address. --- Change from v8: - hest_addr_lr is now pointing to the error

[PATCH v2 07/13] acpi/ghes: add a notifier to notify when error data is ready

2025-01-29 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 Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 5 - include/hw/acpi/ghes.h | 3 +++ 2 files

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

2025-01-29 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 v2 08/13] acpi/ghes: Cleanup the code which gets ghes ged state

2025-01-29 Thread Mauro Carvalho Chehab
Move the check logic into a common function and simplify the code which checks if GHES is enabled and was properly setup. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes-stub.c| 7 --- hw/acpi/ghes.c | 43

[PATCH v2 09/13] acpi/generic_event_device: add an APEI error device

2025-01-29 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 v4 0/5] Change ghes driver to use HEST-based offsets

2025-01-13 Thread Mauro Carvalho Chehab
of upstream master 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. *** BLURB HERE *** Mauro Carvalho Chehab

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

2025-01-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 Reviewed-by: Jonathan Cameron --- Change from v8: - hest_addr_lr is now pointing to the error source size and data. --- hw/acpi/ghes.c | 17 - include

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

2025-01-13 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 v4 5/5] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-01-13 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 v4 3/5] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-01-13 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 --- hw/acpi/ghes.c | 98 -- 1 file changed, 88 insertions(+), 10 deletions(-) diff --git a/hw

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

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

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

2025-01-15 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 v7 13/16] acpi/ghes: better name the offset of the hardware error firmware

2025-01-15 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 v7 12/16] acpi/ghes: rename etc/hardware_error file macros

2025-01-15 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 v7 10/16] acpi/ghes: better name GHES memory error function

2025-01-15 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 v7 09/16] acpi/ghes: make the GHES record generation more generic

2025-01-15 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 Reviewed-by: Igor Mammedov Reviewed-by: Jonathan

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

2025-01-15 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 v7 03/16] acpi/ghes: simplify the per-arch caller to build HEST table

2025-01-15 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 v7 15/16] acpi/ghes: Change ghes fill logic to work with only one source

2025-01-15 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 v7 16/16] docs: acpi_hest_ghes: fix documentation for CPER size

2025-01-15 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

Re: [PATCH v6 00/16] Prepare GHES driver to support error injection

2025-01-15 Thread Mauro Carvalho Chehab
Em Wed, 15 Jan 2025 06:09:12 -0500 "Michael S. Tsirkin" escreveu: > On Sat, Dec 07, 2024 at 09:54:06AM +0100, Mauro Carvalho Chehab wrote: > > Hi Michael, > > > > Please ignore the patch series I sent yesterday: > > https://lore.kernel.org/qemu-devel

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

2025-01-15 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 v7 11/16] acpi/ghes: don't crash QEMU if ghes GED is not found

2025-01-15 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 v7 04/16] acpi/ghes: better handle source_id and notification

2025-01-15 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 v7 02/16] acpi/ghes: simplify acpi_ghes_record_errors() code

2025-01-15 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 v7 00/16] Prepare GHES driver to support error injection

2025-01-15 Thread Mauro Carvalho Chehab
reparation 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 (16):

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

2025-01-15 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 Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 4 1 file changed, 4 deletions(-) diff

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

2025-01-15 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 v7 05/16] acpi/ghes: Fix acpi_ghes_record_errors() argument

2025-01-15 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

Re: [PATCH 0/4] target/arm: Improvement on memory error handling

2025-02-14 Thread Mauro Carvalho Chehab
Em Fri, 14 Feb 2025 14:16:31 +1000 Gavin Shan escreveu: > Currently, there is only one CPER buffer (entry), meaning only one > memory error can be reported. In extreme case, multiple memory errors > can be raised on different vCPUs. For example, a singile memory error > on a 64KB page of the host

[PATCH v4 08/14] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-02-21 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 10.0 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 v4 13/14] qapi/acpi-hest: add an interface to do generic CPER error injection

2025-02-21 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 Acked-by: Igor Mammedov Acked-by: Markus Armbruster --- Changes since v9: - ARM

[PATCH v4 06/14] acpi/ghes: create an ancillary acpi_ghes_get_state() function

2025-02-21 Thread Mauro Carvalho Chehab
Instead of having a function to check if ACPI is enabled (acpi_ghes_present), change its logic to be more generic, returing a pointed to AcpiGhesState. Such change allows cleanup the ghes GED state code, avoiding to read it multiple times, and simplifying the code. Signed-off-by: Mauro Carvalho

[PATCH v4 14/14] scripts/ghes_inject: add a script to generate GHES error inject

2025-02-21 Thread Mauro Carvalho Chehab
Such script allows customizing the error data, allowing to change all fields at the record. Please use: $ ghes_inject.py arm -h For more details about its usage. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- MAINTAINERS| 3 + scripts

[PATCH v4 11/14] arm/virt: Wire up a GED error device for ACPI / GHES

2025-02-21 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 v4 05/14] acpi/ghes: add a notifier to notify when error data is ready

2025-02-21 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 Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 5 - include/hw/acpi/ghes.h | 3 +++ 2 files

[PATCH v4 07/14] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-02-21 Thread Mauro Carvalho Chehab
The GHES migration logic should now support HEST table location too. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/generic_event_device.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/acpi

[PATCH v4 01/14] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-02-21 Thread Mauro Carvalho Chehab
replicates what OSPM does. As the next patches will be adding a more generic logic, add a new use_hest_addr, set to false, in preparation for such changes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 46 hw/arm/virt-acpi-build.c

[PATCH v4 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-21 Thread Mauro Carvalho Chehab
t one whitelisting such tables; second one removing from whitelist and updating/adding such tables to tests/data/acpi) Mauro Carvalho Chehab (14): acpi/ghes: prepare to change the way HEST offsets are calculated acpi/ghes: add a firmware file with HEST address acpi/ghes: Use HEST table of

[PATCH v4 09/14] acpi/generic_event_device: add an APEI error device

2025-02-21 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 v4 02/14] acpi/ghes: add a firmware file with HEST address

2025-02-21 Thread Mauro Carvalho Chehab
Store HEST table address at GPA, placing its the start of the table at hest_addr_le variable. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 22 -- include/hw/acpi/ghes.h | 7 ++- 2 files

[PATCH v4 03/14] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-21 Thread Mauro Carvalho Chehab
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 | 100 + include/hw/acpi/ghes.h | 2 +- 2 files changed, 101 insertions(+), 1

[PATCH v4 04/14] acpi/ghes: don't hard-code the number of sources for HEST table

2025-02-21 Thread Mauro Carvalho Chehab
the same time, change the logic to be more flexible, allowing the number of sources to be defined when building the HEST table by the caller. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 38

[PATCH v4 12/14] tests/acpi: virt: add a HEST table to aarch64 virt and update DSDT

2025-02-21 Thread Mauro Carvalho Chehab
*/) // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID } + +Device (GEDD) +{ +Name (_HID, "PNP0C33" /* Error Device */) // _HID: Hardware ID +Name (_UID, Zero) // _UID: Unique ID + } } } Signed-off-by

Re: [PATCH v3 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-21 Thread Mauro Carvalho Chehab
Em Fri, 21 Feb 2025 13:23:06 +0100 Mauro Carvalho Chehab escreveu: > Em Fri, 21 Feb 2025 10:21:27 + > Jonathan Cameron escreveu: > > > On Fri, 21 Feb 2025 07:38:23 +0100 > > Mauro Carvalho Chehab wrote: > > > > > Em Mon, 3 Feb 2025 16:22:36

[PATCH v4 10/14] tests/acpi: virt: allow acpi table changes for a new table: HEST

2025-02-21 Thread Mauro Carvalho Chehab
The DSDT table will also be affected by such change. Signed-off-by: Mauro Carvalho Chehab --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index

Re: [PATCH v3 03/14] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-20 Thread Mauro Carvalho Chehab
Em Mon, 3 Feb 2025 15:34:23 +0100 Igor Mammedov escreveu: > On Fri, 31 Jan 2025 18:42:44 +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 v3 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-20 Thread Mauro Carvalho Chehab
Em Mon, 3 Feb 2025 16:22:36 +0100 Igor Mammedov escreveu: > On Mon, 3 Feb 2025 11:09:34 + > Jonathan Cameron wrote: > > > On Fri, 31 Jan 2025 18:42:41 +0100 > > Mauro Carvalho Chehab wrote: > > > > > Now that the ghes preparation patches were merge

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

2025-02-20 Thread Mauro Carvalho Chehab
Em Wed, 05 Feb 2025 09:16:53 +0100 Markus Armbruster escreveu: > Mauro Carvalho Chehab writes: > > > Using the QMP GHESv2 API requires preparing a raw data array > > containing a CPER record. > > > > Add a helper script with subcommands to prepare such dat

Re: [PATCH v3 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-21 Thread Mauro Carvalho Chehab
Em Fri, 21 Feb 2025 10:21:27 + Jonathan Cameron escreveu: > On Fri, 21 Feb 2025 07:38:23 +0100 > Mauro Carvalho Chehab wrote: > > > Em Mon, 3 Feb 2025 16:22:36 +0100 > > Igor Mammedov escreveu: > > > > > On Mon, 3 Feb 2025 11:09:34

Re: [PATCH v4 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Mauro Carvalho Chehab
Em Wed, 26 Feb 2025 15:16:56 +0100 Igor Mammedov escreveu: > On Fri, 21 Feb 2025 15:35:09 +0100 > Mauro Carvalho Chehab wrote: > > > Now that the ghes preparation patches were merged, let's add support > > for error injection. > > > > On this series, the

Re: [PATCH v3 03/14] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-26 Thread Mauro Carvalho Chehab
Em Tue, 25 Feb 2025 10:43:27 +0100 Igor Mammedov escreveu: > On Fri, 21 Feb 2025 07:02:21 +0100 > Mauro Carvalho Chehab wrote: > > > Em Mon, 3 Feb 2025 15:34:23 +0100 > > Igor Mammedov escreveu: > > > > > On Fri, 31 Jan 2025 18:42:44 +010

Re: [PATCH v3 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Mauro Carvalho Chehab
Em Wed, 26 Feb 2025 10:56:28 +0100 Mauro Carvalho Chehab escreveu: > Em Tue, 25 Feb 2025 11:01:15 +0100 > Igor Mammedov escreveu: > > > On Fri, 21 Feb 2025 10:21:27 + > > Jonathan Cameron wrote: > > > > > On Fri, 21 Feb 2025 07:38:23 +010

Re: [PATCH v3 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Mauro Carvalho Chehab
Em Wed, 26 Feb 2025 12:23:03 +0100 Mauro Carvalho Chehab escreveu: > Em Wed, 26 Feb 2025 10:56:28 +0100 > Mauro Carvalho Chehab escreveu: > > > Em Tue, 25 Feb 2025 11:01:15 +0100 > > Igor Mammedov escreveu: > > > > > On Fri, 21 Feb 2025 10:21:27

Re: [PATCH v3 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Mauro Carvalho Chehab
Em Tue, 25 Feb 2025 11:01:15 +0100 Igor Mammedov escreveu: > On Fri, 21 Feb 2025 10:21:27 + > Jonathan Cameron wrote: > > > On Fri, 21 Feb 2025 07:38:23 +0100 > > Mauro Carvalho Chehab wrote: > > > > > Em Mon, 3 Feb 2025 16:22:36

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

2025-02-27 Thread Mauro Carvalho Chehab
Such script allows customizing the error data, allowing to change all fields at the record. Please use: $ ghes_inject.py arm -h For more details about its usage. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- MAINTAINERS| 3 + scripts

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

2025-02-27 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 Acked-by: Igor Mammedov Acked-by: Markus Armbruster --- MAINTAINERS

[PATCH v5 13/21] acpi/generic_event_device: add an APEI error device

2025-02-27 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 v4 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-27 Thread Mauro Carvalho Chehab
Em Thu, 27 Feb 2025 10:54:54 +0100 Igor Mammedov escreveu: > On Fri, 21 Feb 2025 15:35:09 +0100 > Mauro Carvalho Chehab wrote: > > > Now that the ghes preparation patches were merged, let's add support > > for error injection. > > > > On this series, the

[PATCH v5 08/21] acpi/ghes: don't hard-code the number of sources for HEST table

2025-02-27 Thread Mauro Carvalho Chehab
the same time, change the logic to be more flexible, allowing the number of sources to be defined when building the HEST table by the caller. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 39

[PATCH v5 03/21] tests/acpi: virt: update HEST file with its current data

2025-02-27 Thread Mauro Carvalho Chehab
Now that HEST table is checked for aarch64, add the current firmware file. Signed-off-by: Mauro Carvalho Chehab --- tests/data/acpi/aarch64/virt/HEST | Bin 0 -> 132 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/a

[PATCH v5 04/21] acpi/ghes: Cleanup the code which gets ghes ged state

2025-02-27 Thread Mauro Carvalho Chehab
Move the check logic into a common function and simplify the code which checks if GHES is enabled and was properly setup. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes-stub.c| 7 --- hw/acpi/ghes.c | 38

[PATCH v5 19/21] docs: hest: add new "etc/acpi_table_hest_addr" and update workflow

2025-02-27 Thread Mauro Carvalho Chehab
While the HEST layout didn't change, there are some internal changes related to how offsets are calculated and how memory error events are triggered. Update specs to reflect such changes. Signed-off-by: Mauro Carvalho Chehab --- docs/specs/acpi_hest_ghes.rst

[PATCH v5 10/21] acpi/ghes: create an ancillary acpi_ghes_get_state() function

2025-02-27 Thread Mauro Carvalho Chehab
Instead of having a function to check if ACPI is enabled (acpi_ghes_present), change its logic to be more generic, returing a pointed to AcpiGhesState. Such change allows cleanup the ghes GED state code, avoiding to read it multiple times, and simplifying the code. Signed-off-by: Mauro Carvalho

[PATCH v5 06/21] acpi/ghes: add a firmware file with HEST address

2025-02-27 Thread Mauro Carvalho Chehab
Store HEST table address at GPA, placing its the start of the table at hest_addr_le variable. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 20 +++- include/hw/acpi/ghes.h | 7 ++- 2 files

[PATCH v5 12/21] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-02-27 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 10.0 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 v5 11/21] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-02-27 Thread Mauro Carvalho Chehab
The GHES migration logic should now support HEST table location too. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/generic_event_device.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/acpi

[PATCH v5 20/21] acpi/generic_event_device.c: enable use_hest_addr for QEMU 10.x

2025-02-27 Thread Mauro Carvalho Chehab
Now that we have everything in place, enable using HEST GPA instead of etc/hardware_errors GPA. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/generic_event_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/generic_event_device.c b/hw/acpi

[PATCH v5 01/21] tests/acpi: virt: add an empty HEST file

2025-02-27 Thread Mauro Carvalho Chehab
Such file will be used to track HEST table changes. For now, disallow HEST table check until we update it to the current data. Signed-off-by: Mauro Carvalho Chehab --- tests/data/acpi/aarch64/virt/HEST | 0 tests/qtest/bios-tables-test-allowed-diff.h | 1 + 2 files changed, 1

[PATCH v5 02/21] tests/qtest/bios-tables-test: extend to also check HEST table

2025-02-27 Thread Mauro Carvalho Chehab
Currently, aarch64 can generate a HEST table when loaded with -machine ras=on. Add support for it. Signed-off-by: Mauro Carvalho Chehab --- tests/qtest/bios-tables-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables

[PATCH v5 17/21] tests/acpi: virt: update HEST table to accept two sources

2025-02-27 Thread Mauro Carvalho Chehab
Read Ack Write : 0001 + +Raw Table Data: Length 224 (0xE0) + Signed-off-by: Mauro Carvalho Chehab --- tests/data/acpi/aarch64/virt/HEST | Bin 132 -> 224 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/data/acpi/aarch64/virt/HEST

[PATCH v5 07/21] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-27 Thread Mauro Carvalho Chehab
block structures. Yet, keep the old code, as this is needed for migration purposes from older QEMU versions. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 100 + include/hw/acpi/ghes.h | 2 +- 2 files

[PATCH v5 18/21] tests/acpi: virt: and update DSDT table to add the new GED device

2025-02-27 Thread Mauro Carvalho Chehab
Name (_UID, Zero) // _UID: Unique ID } + +Device (GEDD) +{ +Name (_HID, "PNP0C33" /* Error Device */) // _HID: Hardware ID +Name (_UID, Zero) // _UID: Unique ID +} } } Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jon

[PATCH v5 14/21] tests/acpi: virt: allow acpi table changes at DSDT and HEST tables

2025-02-27 Thread Mauro Carvalho Chehab
We'll be adding a new GED device for HEST GPIO notification and increasing the number of entries at the HEST table. Blocklist testing HEST and DSDT tables until such changes are completed. Signed-off-by: Mauro Carvalho Chehab --- tests/qtest/bios-tables-test-allowed-diff.h | 6 ++ 1

[PATCH v5 05/21] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-02-27 Thread Mauro Carvalho Chehab
replicates what OSPM does. As the next patches will be adding a more generic logic, add a new use_hest_addr, set to false, in preparation for such changes. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 39 --- hw/arm/virt-acpi-build.c

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

2025-02-27 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 v5 00/21]Change ghes to use HEST-based offsets and add support for error inject

2025-02-27 Thread Mauro Carvalho Chehab
arget happy. (two patches: first one whitelisting such tables; second one removing from whitelist and updating/adding such tables to tests/data/acpi) Mauro Carvalho Chehab (21): tests/acpi: virt: add an empty HEST file tests/qtest/bios-tables-test: extend to also check HEST table tests

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

2025-02-27 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 Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 5 - include/hw/acpi/ghes.h | 3 +++ 2 files

Re: [PATCH v5 10/21] acpi/ghes: create an ancillary acpi_ghes_get_state() function

2025-02-27 Thread Mauro Carvalho Chehab
Em Thu, 27 Feb 2025 12:03:40 +0100 Mauro Carvalho Chehab escreveu: > Instead of having a function to check if ACPI is enabled > (acpi_ghes_present), change its logic to be more generic, > returing a pointed to AcpiGhesState. > > Such change allows cleanup the ghes GED state code

Re: [PATCH v4 01/14] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-02-27 Thread Mauro Carvalho Chehab
Em Wed, 26 Feb 2025 15:37:14 +0100 Igor Mammedov escreveu: > On Fri, 21 Feb 2025 15:35:10 +0100 > Mauro Carvalho Chehab wrote: > > > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c > > index 3ac8f8e17861..8ab8d11b6536 100644 > > --- a/hw/arm/virt-ac

[PATCH v7 00/19] Change ghes to use HEST-based offsets and add support for error inject

2025-03-02 Thread Mauro Carvalho Chehab
om whitelist and updating/adding such tables to tests/data/acpi) Mauro Carvalho Chehab (19): tests/acpi: virt: add an empty HEST file tests/qtest/bios-tables-test: extend to also check HEST table tests/acpi: virt: update HEST file with its current data acpi/ghes: Cleanup the code whic

[PATCH v7 01/19] tests/acpi: virt: add an empty HEST file

2025-03-02 Thread Mauro Carvalho Chehab
Such file will be used to track HEST table changes. For now, disallow HEST table check until we update it to the current data. Signed-off-by: Mauro Carvalho Chehab Acked-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- tests/data/acpi/aarch64/virt/HEST | 0 tests/qtest/bios

[PATCH v7 03/19] tests/acpi: virt: update HEST file with its current data

2025-03-02 Thread Mauro Carvalho Chehab
Now that HEST table is checked for aarch64, add the current firmware file. Signed-off-by: Mauro Carvalho Chehab Acked-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- tests/data/acpi/aarch64/virt/HEST | Bin 0 -> 132 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 -

[PATCH v7 08/19] acpi/ghes: don't hard-code the number of sources for HEST table

2025-03-02 Thread Mauro Carvalho Chehab
the same time, change the logic to be more flexible, allowing the number of sources to be defined when building the HEST table by the caller. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 39

[PATCH v7 07/19] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-03-02 Thread Mauro Carvalho Chehab
block structures. Yet, keep the old code, as this is needed for migration purposes from older QEMU versions. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 100 + include/hw/acpi

[PATCH v7 09/19] acpi/ghes: add a notifier to notify when error data is ready

2025-03-02 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 Reviewed-by: Jonathan Cameron Acked-by: Igor Mammedov --- hw/acpi/ghes.c | 5 - include/hw

[PATCH v7 16/19] acpi/generic_event_device.c: enable use_hest_addr for QEMU 10.x

2025-03-02 Thread Mauro Carvalho Chehab
Now that we have everything in place, enable using HEST GPA instead of etc/hardware_errors GPA. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/generic_event_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v7 02/19] tests/qtest/bios-tables-test: extend to also check HEST table

2025-03-02 Thread Mauro Carvalho Chehab
Currently, aarch64 can generate a HEST table when loaded with -machine ras=on. Add support for it. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron --- tests/qtest/bios-tables-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v7 05/19] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-03-02 Thread Mauro Carvalho Chehab
replicates what OSPM does. As the next patches will be adding a more generic logic, add a new use_hest_addr, set to false, in preparation for such changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 39

[PATCH v7 18/19] docs: hest: add new "etc/acpi_table_hest_addr" and update workflow

2025-03-02 Thread Mauro Carvalho Chehab
While the HEST layout didn't change, there are some internal changes related to how offsets are calculated and how memory error events are triggered. Update specs to reflect such changes. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov ---

[PATCH v7 06/19] acpi/ghes: add a firmware file with HEST address

2025-03-02 Thread Mauro Carvalho Chehab
Store HEST table address at GPA, placing its the start of the table at hest_addr_le variable. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 22 -- include/hw/acpi/ghes.h | 6 +- 2 files

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

2025-03-02 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

<    1   2   3   4   5   6   >