Re: [PATCH v10 (RESEND) 00/20] Change ghes to use HEST-based offsets and add support for error inject

2025-07-15 Thread Mauro Carvalho Chehab
Em Tue, 15 Jul 2025 13:36:26 -0400 "Michael S. Tsirkin" escreveu: > On Thu, Jun 12, 2025 at 05:17:24PM +0200, Mauro Carvalho Chehab wrote: > > Hi Michael, > > > > This is v10 of the patch series, rebased to apply after release > > 10.0. The only dif

[PATCH v10 (RESEND) 20/20] scripts/ghes_inject: add a script to generate GHES error inject

2025-06-12 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 v10 (RESEND) 12/20] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-06-12 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 v10 (RESEND) 08/20] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-06-12 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 v10 (RESEND) 02/20] tests/qtest/bios-tables-test: extend to also check HEST table

2025-06-12 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 v10 (RESEND) 09/20] acpi/ghes: don't hard-code the number of sources for HEST table

2025-06-12 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 v10 (RESEND) 18/20] tests/acpi: virt: update HEST and DSDT tables

2025-06-12 Thread Mauro Carvalho Chehab
B) { Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID } + +Device (GEDD) +{ +Name (_HID, "PNP0C33" /* Error Device */) // _HID: Hardware ID +

[PATCH v10 (RESEND) 10/20] acpi/ghes: add a notifier to notify when error data is ready

2025-06-12 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 v10 (RESEND) 19/20] docs: hest: add new "etc/acpi_table_hest_addr" and update workflow

2025-06-12 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 v10 (RESEND) 14/20] tests/acpi: virt: allow acpi table changes at DSDT and HEST tables

2025-06-12 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 Acked-by: Igor Mammedov Reviewed-by: Jonathan Cameron ---

[PATCH v10 (RESEND) 00/20] Change ghes to use HEST-based offsets and add support for error inject

2025-06-12 Thread Mauro Carvalho Chehab
target 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 (20): tests/acpi: virt: add an empty HEST file tests/qtest/bios-tables-test: extend to also check HEST table tests/acpi:

[PATCH v10 (RESEND) 05/20] acpi/ghes: Cleanup the code which gets ghes ged state

2025-06-12 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 v10 (RESEND) 13/20] acpi/generic_event_device: add an APEI error device

2025-06-12 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 (RESEND) 01/20] tests/acpi: virt: add an empty HEST file

2025-06-12 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 v10 (RESEND) 11/20] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-06-12 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 v10 (RESEND) 03/20] tests/acpi: virt: update HEST file with its current data

2025-06-12 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 v10 (RESEND) 16/20] qapi/acpi-hest: add an interface to do generic CPER error injection

2025-06-12 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 v10 (RESEND) 17/20] acpi/generic_event_device.c: enable use_hest_addr for QEMU 10.x

2025-06-12 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 v10 (RESEND) 07/20] acpi/ghes: add a firmware file with HEST address

2025-06-12 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 v10 (RESEND) 15/20] arm/virt: Wire up a GED error device for ACPI / GHES

2025-06-12 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 (RESEND) 06/20] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-06-12 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 v10 (RESEND) 04/20] Revert "hw/acpi/ghes: Make ghes_record_cper_errors() static"

2025-06-12 Thread Mauro Carvalho Chehab
igned-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/acpi/ghes.c | 6 -- include/hw/acpi/ghes.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index b85bb48195a0..b709c177cdea 100644 --- a/hw/acpi/ghes.c +++ b/hw

Re: [PATCH v9 12/20] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-06-02 Thread Mauro Carvalho Chehab
Em Mon, 2 Jun 2025 12:22:44 +0200 Igor Mammedov escreveu: > On Fri, 30 May 2025 22:18:10 +0200 > Mauro Carvalho Chehab wrote: > > > Em Fri, 30 May 2025 16:49:03 +0200 > > Igor Mammedov escreveu: > > > > > On Fri, 30 May 2025 08:01:28 -04

Re: [PATCH v9 12/20] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-05-30 Thread Mauro Carvalho Chehab
Em Fri, 30 May 2025 16:49:03 +0200 Igor Mammedov escreveu: > On Fri, 30 May 2025 08:01:28 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, May 28, 2025 at 05:42:12PM +0200, Igor Mammedov wrote: > > > On Tue, 20 May 2025 08:41:31 +0200

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

2025-05-20 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 v9 15/20] arm/virt: Wire up a GED error device for ACPI / GHES

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

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

2025-05-20 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

Re: [PATCH v8 09/20] acpi/ghes: don't hard-code the number of sources for HEST table

2025-05-20 Thread Mauro Carvalho Chehab
Em Mon, 12 May 2025 15:42:27 -0400 "Michael S. Tsirkin" escreveu: > On Fri, Mar 07, 2025 at 08:14:38PM +0100, Mauro Carvalho Chehab wrote: > > The current code is actually dependent on having just one error > > structure with a single source, as any change there would c

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

2025-05-20 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 v9 08/20] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-05-19 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 v9 11/20] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-05-19 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 v9 04/20] Revert "hw/acpi/ghes: Make ghes_record_cper_errors() static"

2025-05-19 Thread Mauro Carvalho Chehab
igned-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 6 -- include/hw/acpi/ghes.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index b85bb48195a0..b709c177cdea 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c @@ -390,8 +

[PATCH v9 01/20] tests/acpi: virt: add an empty HEST file

2025-05-19 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

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

2025-05-19 Thread Mauro Carvalho Chehab
Em Sun, 11 May 2025 09:45:55 -0400 "Michael S. Tsirkin" escreveu: > On Sun, May 11, 2025 at 09:45:04AM -0400, Michael S. Tsirkin wrote: > > On Fri, Mar 07, 2025 at 08:14:29PM +0100, Mauro Carvalho Chehab wrote: > > > Hi Michael, > > > > > > I'

[PATCH v9 13/20] acpi/generic_event_device: add an APEI error device

2025-05-19 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 20/20] scripts/ghes_inject: add a script to generate GHES error inject

2025-05-19 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 v9 19/20] docs: hest: add new "etc/acpi_table_hest_addr" and update workflow

2025-05-19 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 v9 06/20] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-05-19 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 v9 18/20] tests/acpi: virt: update HEST and DSDT tables

2025-05-19 Thread Mauro Carvalho Chehab
B) { Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID } + +Device (GEDD) +{ +Name (_HID, "PNP0C33" /* Error Device */) // _HID: Hardware ID +

[PATCH v9 05/20] acpi/ghes: Cleanup the code which gets ghes ged state

2025-05-19 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 v9 09/20] acpi/ghes: don't hard-code the number of sources for HEST table

2025-05-19 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 v9 03/20] tests/acpi: virt: update HEST file with its current data

2025-05-19 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 v9 02/20] tests/qtest/bios-tables-test: extend to also check HEST table

2025-05-19 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 v9 00/20] Change ghes to use HEST-based offsets and add support for error inject

2025-05-19 Thread Mauro Carvalho Chehab
ables after the changes to make check target 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 (20): tests/acpi: virt: add an empty HEST file tests/qtest/bios-tables-test: exte

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

2025-05-19 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 v9 07/20] acpi/ghes: add a firmware file with HEST address

2025-05-19 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 v9 14/20] tests/acpi: virt: allow acpi table changes at DSDT and HEST tables

2025-05-19 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 Acked-by: Igor Mammedov Reviewed-by: Jonathan Cameron ---

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

2025-03-24 Thread Mauro Carvalho Chehab
Hi Michael, Gentile ping. Regards, Mauro Em Fri, 7 Mar 2025 20:14:29 +0100 Mauro Carvalho Chehab escreveu: > Hi Michael, > > I'm sending v8 to avoid a merge conflict with v7 due to this > changeset: > >611f3bdb20f7 ("hw/acpi/ghes: Make static") >

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

2025-03-08 Thread Mauro Carvalho Chehab
Hi Phillipe, Em Fri, 7 Mar 2025 22:05:27 +0100 Philippe Mathieu-Daudé escreveu: > Hi Mauro, > > On 7/3/25 20:14, Mauro Carvalho Chehab wrote: > > Using the QMP GHESv2 API requires preparing a raw data array > > containing a CPER record. > > > > Add a helper s

[PATCH v8 05/20] acpi/ghes: Cleanup the code which gets ghes ged state

2025-03-07 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 v8 18/20] tests/acpi: virt: update HEST and DSDT tables

2025-03-07 Thread Mauro Carvalho Chehab
B) { Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID } + +Device (GEDD) +{ +Name (_HID, "PNP0C33" /* Error Device */) // _HID: Hardware ID +

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

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

[PATCH v8 10/20] acpi/ghes: add a notifier to notify when error data is ready

2025-03-07 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 v8 15/20] arm/virt: Wire up a GED error device for ACPI / GHES

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

[PATCH v8 11/20] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-03-07 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 v8 00/20] Change ghes to use HEST-based offsets and add support for error inject

2025-03-07 Thread Mauro Carvalho Chehab
from whitelist and updating/adding such tables to tests/data/acpi) Mauro Carvalho Chehab (20): 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 Revert "hw/acpi/ghes: Make ghes_

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

2025-03-07 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 v8 06/20] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-03-07 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 v8 14/20] tests/acpi: virt: allow acpi table changes at DSDT and HEST tables

2025-03-07 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 Acked-by: Igor Mammedov Reviewed-by: Jonathan Cameron ---

[PATCH v8 07/20] acpi/ghes: add a firmware file with HEST address

2025-03-07 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 v8 09/20] acpi/ghes: don't hard-code the number of sources for HEST table

2025-03-07 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 v8 19/20] docs: hest: add new "etc/acpi_table_hest_addr" and update workflow

2025-03-07 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 v8 08/20] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-03-07 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 v8 02/20] tests/qtest/bios-tables-test: extend to also check HEST table

2025-03-07 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 v8 03/20] tests/acpi: virt: update HEST file with its current data

2025-03-07 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 v8 12/20] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-03-07 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 v8 01/20] tests/acpi: virt: add an empty HEST file

2025-03-07 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 v8 04/20] Revert "hw/acpi/ghes: Make ghes_record_cper_errors() static"

2025-03-07 Thread Mauro Carvalho Chehab
igned-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 6 -- include/hw/acpi/ghes.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index b85bb48195a0..b709c177cdea 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c @@ -390,8 +

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

2025-03-07 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 v8 17/20] acpi/generic_event_device.c: enable use_hest_addr for QEMU 10.x

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

Re: [PULL 11/41] hw/acpi/ghes: Make ghes_record_cper_errors() static

2025-03-06 Thread Mauro Carvalho Chehab
Em Wed, 5 Mar 2025 02:21:26 +0100 Philippe Mathieu-Daudé escreveu: > From: Gavin Shan > > acpi_ghes_memory_errors() is the only caller, no need to expose > the function. Besides, the last 'return' in this function isn't > necessary and remove it. > > No functional changes intended. Please re

[PATCH RFC 3/3] Add a GED device for RAS notification

2025-03-04 Thread Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab --- hw/i386/acpi-build.c | 42 ++ hw/i386/pc.c | 7 +++ include/hw/i386/x86.h | 2 ++ 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index

[PATCH RFC 2/3] hw/i186: add support for HEST table with SCI

2025-03-04 Thread Mauro Carvalho Chehab
::-:22 \ -qmp tcp:localhost:4445,server=on,wait=off \ -append 'earlycon nomodeset root=/dev/vda1 fsck.mode=skip tp_printk maxcpus=4 console=ttyS0 console=tty0' TODO: add a notifier logic. Signed-off-by: Mauro Carvalho Chehab --- hw/i386/Kconfig | 1 + hw/i386/ac

[PATCH RFC 1/3] acpi/ghes: move use_hest_addr out of acpi_build_hest()

2025-03-04 Thread Mauro Carvalho Chehab
plug logic there may not initialize ags during acpi table build time. Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 16 hw/arm/virt-acpi-build.c | 12 include/hw/acpi/ghes.h | 25 + 3 files changed, 29 insertions(+), 24

[PATCH RFC 0/3] Attempt to add GHES for x86

2025-03-04 Thread Mauro Carvalho Chehab
proving it further. It can be tested with: $ ./scripts/ghes_inject.py arm (Ok, this would be generating an ARM processor event , but I guess Linux would at least mark the event as read, even if it doesn't recognize it) Mauro Carvalho Chehab (3): acpi/ghes: move use_hest_addr out of

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

2025-03-03 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 v7 10/19] acpi/generic_event_device: Update GHES migration to cover hest addr

2025-03-02 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 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 13/19] tests/acpi: virt: allow acpi table changes at DSDT and HEST tables

2025-03-02 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 Acked-by: Igor Mammedov Reviewed-by: Jonathan Cameron ---

[PATCH v7 11/19] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-03-02 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 v7 17/19] tests/acpi: virt: update HEST and DSDT tables

2025-03-02 Thread Mauro Carvalho Chehab
B) { Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID } + +Device (GEDD) +{ +Name (_HID, "PNP0C33" /* Error Device */) // _HID: Hardware ID +

[PATCH v7 12/19] acpi/generic_event_device: add an APEI error device

2025-03-02 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 v7 15/19] qapi/acpi-hest: add an interface to do generic CPER error injection

2025-03-02 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 v7 04/19] acpi/ghes: Cleanup the code which gets ghes ged state

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

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

Re: [PATCH v6 17/19] tests/acpi: virt: update HEST and DSDT tables

2025-02-28 Thread Mauro Carvalho Chehab
Em Fri, 28 Feb 2025 17:33:18 +0800 Jonathan Cameron escreveu: > On Thu, 27 Feb 2025 17:00:55 +0100 > Mauro Carvalho Chehab wrote: > > > - The HEST table now accept two sources; > > - The DSDT tables now have a GED error device. > > > > @@ -1,39 +1,39 @@ >

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

2025-02-27 Thread Mauro Carvalho Chehab
d one removing from 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: Cleanu

[PATCH v6 05/19] 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 v6 07/19] 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 Reviewed-by: Igor Mammedov --- hw/acpi/ghes.c | 100 + include/hw/acpi

[PATCH v6 13/19] 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 Acked-by: Igor Mammedov --- tests/qtest/bios-tables-test-al

  1   2   3   4   5   6   7   >