Skip to contentSkip to conversation

target/arm/kvm: Improve memory error handling

PATCH RESEND Superseded Gavin Shan 4 participants 30 messages Oct 7, 2025 – Nov 7, 2025

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Gavin Shan

author
#0 lore raw

v2 cover target/arm/kvm: Improve memory error handling

Currently, there is only one CPER buffer (entry) can be delivered and acknoledged at once. This conflicts to the scenario where the host and guest has 64KB and 4KB page size. In this specific scenario, a problematic host page can affect 16x guest pages, resulting in 16x memory errors in the worst case. Unfortunately, qemu runs to core dump at (a) because the previous error isn't acknoledged and current error is no way to be delivered, shown in the following call trace

kvm_vcpu_thread_fn
kvm_cpu_exec
kvm_arch_on_sigbus_vcpu
kvm_cpu_synchronize_state
acpi_ghes_memory_errors (a)
kvm_inject_arm_sea | abort

Fix the issue by sending 16x consecutive memory CPER entries for this specific case in one shot. With the series applied, no qemu core dump is observed in the test where (4KB) guest memory access is triggered by 'victimd' and the recoverable memory error is injected from the (64KB) host.

Changelog
=========
v2:
* v1: https://lists.nongnu.org/archive/html/qemu-arm/2025-02/msg00897.html
* Send 16x memory errors for the specific case (Jonathan)

Gavin Shan (3):
acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs kvm/arm/kvm: Introduce helper push_ghes_memory_errors() target/arm/kvm: Support multiple memory CPERs injection

 hw/acpi/ghes-stub.c    |  2 +-
 hw/acpi/ghes.c         | 29 ++++++++--------
 include/hw/acpi/ghes.h |  2 +-
 target/arm/kvm.c       | 77 +++++++++++++++++++++++++++++++++++++-----
 4 files changed, 86 insertions(+), 24 deletions(-)
Signature · 1 line
2.51.0
author
#1 lore raw

PATCH RESEND v2 1/3 acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs

In the situation where host and guest has 64KB and 4KB page sizes, one error on the host's page affects 16 guest's pages. we need to send 16 consective errors in this specific case.

Extend acpi_ghes_memory_errors() to support multiple CPERs after the hunk of code to generate the GHES error status is pulled out from ghes_gen_err_data_uncorrectable_recoverable().

No functional changes intended.

---
 hw/acpi/ghes-stub.c    |  2 +-
 hw/acpi/ghes.c         | 27 ++++++++++++++-------------
 include/hw/acpi/ghes.h |  2 +-
 target/arm/kvm.c       |  7 ++++++-
 4 files changed, 22 insertions(+), 16 deletions(-)
hw/acpi/ghes-stub.c +1 -1
index 40f660c246..c1f8c9bec9 100644
@@ -12,7 +12,7 @@
 #include "hw/acpi/ghes.h"
 
 int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t physical_address)
+                            GArray *addresses)
 {
     return -1;
 }
hw/acpi/ghes.c +14 -13
index 06555905ce..045b77715f 100644
@@ -214,18 +214,13 @@ static void acpi_ghes_build_append_mem_cper(GArray *table,
 
 static void
 ghes_gen_err_data_uncorrectable_recoverable(GArray *block,
-                                            const uint8_t *section_type,
-                                            int data_length)
+                                            const uint8_t *section_type)
 {
     /* invalid fru id: ACPI 4.0: 17.3.2.6.1 Generic Error Data,
      * Table 17-13 Generic Error Data Entry
      */
     QemuUUID fru_id = {};
 
-    /* Build the new generic error status block header */
-    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE,
-        0, 0, data_length, ACPI_CPER_SEV_RECOVERABLE);
-
     /* Build this new generic error data entry header */
     acpi_ghes_generic_error_data(block, section_type,
         ACPI_CPER_SEV_RECOVERABLE, 0, 0,
@@ -557,19 +552,20 @@ void ghes_record_cper_errors(AcpiGhesState *ags, const void *cper, size_t len,
 }
 
 int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t physical_address)
+                            GArray *addresses)
 {
     /* Memory Error Section Type */
     const uint8_t guid[] =
           UUID_LE(0xA5BC1114, 0x6F64, 0x4EDE, 0xB8, 0x63, 0x3E, 0x83, \
                   0xED, 0x7C, 0x83, 0xB1);
     Error *errp = NULL;
-    int data_length;
+    int data_length, i;
     GArray *block;
 
     block = g_array_new(false, true /* clear */, 1);
 
-    data_length = ACPI_GHES_DATA_LENGTH + ACPI_GHES_MEM_CPER_LENGTH;
+    data_length = addresses->len *
+                  (ACPI_GHES_DATA_LENGTH + ACPI_GHES_MEM_CPER_LENGTH);
     /*
      * It should not run out of the preallocated memory if adding a new generic
      * error data entry
@@ -577,10 +573,15 @@ int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
     assert((data_length + ACPI_GHES_GESB_SIZE) <=
             ACPI_GHES_MAX_RAW_DATA_LENGTH);
 
-    ghes_gen_err_data_uncorrectable_recoverable(block, guid, data_length);
-
-    /* Build the memory section CPER for above new generic error data entry */
-    acpi_ghes_build_append_mem_cper(block, physical_address);
+    /* Build the new generic error status block header */
+    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE, 0, 0,
+                                   data_length, ACPI_CPER_SEV_RECOVERABLE);
+    for (i = 0; i < addresses->len; i++) {
+        ghes_gen_err_data_uncorrectable_recoverable(block, guid);
+        /* Memory section CPER on top of the generic error data entry */
+        acpi_ghes_build_append_mem_cper(block,
+                                        g_array_index(addresses, uint64_t, i));
+    }
 
     /* Report the error */
     ghes_record_cper_errors(ags, block->data, block->len, source_id, &errp);
include/hw/acpi/ghes.h +1 -1
index df2ecbf6e4..a8cbc520d5 100644
@@ -99,7 +99,7 @@ void acpi_build_hest(AcpiGhesState *ags, GArray *table_data,
 void acpi_ghes_add_fw_cfg(AcpiGhesState *vms, FWCfgState *s,
                           GArray *hardware_errors);
 int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t error_physical_addr);
+                            GArray *addresses);
 void ghes_record_cper_errors(AcpiGhesState *ags, const void *cper, size_t len,
                              uint16_t source_id, Error **errp);
 
target/arm/kvm.c +6 -1
index 4f769d69b3..9a47ac9e3a 100644
@@ -2434,6 +2434,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
     ram_addr_t ram_addr;
     hwaddr paddr;
     AcpiGhesState *ags;
+    GArray *addresses;
 
     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
@@ -2442,6 +2443,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
         ram_addr = qemu_ram_addr_from_host(addr);
         if (ram_addr != RAM_ADDR_INVALID &&
             kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
+            addresses = g_array_new(false, false, sizeof(paddr));
             kvm_hwpoison_page_add(ram_addr);
             /*
              * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2454,16 +2456,19 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
              * later from the main thread, so doing the injection of
              * the error would be more complicated.
              */
+            g_array_append_vals(addresses, &paddr, 1);
             if (code == BUS_MCEERR_AR) {
                 kvm_cpu_synchronize_state(c);
                 if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             paddr)) {
+                                             addresses)) {
                     kvm_inject_arm_sea(c);
                 } else {
                     error_report("failed to record the error");
                     abort();
                 }
             }
+
+            g_array_free(addresses, true);
             return;
         }
         if (code == BUS_MCEERR_AO) {
Signature · 1 line
2.51.0
#2 lore raw

Re: [PATCH RESEND v2 1/3] acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs

Quoted 3 lines · On Tue, 7 Oct 2025 16:08:08 +1000 Gavin Shan <[email protected]> wrote:

In the situation where host and guest has 64KB and 4KB page sizes, one error on the host's page affects 16 guest's pages. we need to send 16 consective errors in this specific case.

Hi Gavin,

Sorry this one has been on my to review list far too long.

Quoted 4 lines

Extend acpi_ghes_memory_errors() to support multiple CPERs after the hunk of code to generate the GHES error status is pulled out from ghes_gen_err_data_uncorrectable_recoverable().

I think this description needs to be more detailed wrt to how those multiple CPERs are handled. Specifically that they are in a single error status block (so should only represent related errors.)

This is to make it clear this isn't queuing events, but instead just presenting them as one block.

Quoted 22 lines

No functional changes intended.

---
 hw/acpi/ghes-stub.c    |  2 +-
 hw/acpi/ghes.c         | 27 ++++++++++++++-------------
 include/hw/acpi/ghes.h |  2 +-
 target/arm/kvm.c       |  7 ++++++-
 4 files changed, 22 insertions(+), 16 deletions(-)
hw/acpi/ghes.c +1 -2
index 06555905ce..045b77715f 100644
@@ -214,18 +214,13 @@ static void acpi_ghes_build_append_mem_cper(GArray *table,
 
 static void
 ghes_gen_err_data_uncorrectable_recoverable(GArray *block,
-                                            const uint8_t *section_type,
-                                            int data_length)
+                                            const uint8_t *section_type)

hw/acpi/ghes.c static void acpi_ghes_build_append_mem_cper(GArray *table, · line 228

Quoted 10 lines
hw/acpi/ghes.c +0 -4
 {
     /* invalid fru id: ACPI 4.0: 17.3.2.6.1 Generic Error Data,
      * Table 17-13 Generic Error Data Entry
      */
     QemuUUID fru_id = {};
 
-    /* Build the new generic error status block header */
-    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE,
-        0, 0, data_length, ACPI_CPER_SEV_RECOVERABLE);
-]

With this bit gone, is it worth having the helper? Perhaps just move the remains to where it is called.

Quoted 17 lines
hw/acpi/ghes.c +0 -0
     /* Build this new generic error data entry header */
     acpi_ghes_generic_error_data(block, section_type,
         ACPI_CPER_SEV_RECOVERABLE, 0, 0,
target/arm/kvm.c +1 -0
index 4f769d69b3..9a47ac9e3a 100644
@@ -2434,6 +2434,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
     ram_addr_t ram_addr;
     hwaddr paddr;
     AcpiGhesState *ags;
+    GArray *addresses;
 
     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 

target/arm/kvm.c void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) · line 2446

Quoted 4 lines
target/arm/kvm.c +1 -0
@@ -2442,6 +2443,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
         ram_addr = qemu_ram_addr_from_host(addr);
         if (ram_addr != RAM_ADDR_INVALID &&
             kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
+            addresses = g_array_new(false, false, sizeof(paddr));

Given you are going to free in all paths, maybe a g_autofree?

Also, we know this only grows to a fixed max size (16 after patch 3), so maybe just provide a hwaddr paddrs[16]; and pass forwards the count?

Quoted 24 lines
target/arm/kvm.c +4 -1
             kvm_hwpoison_page_add(ram_addr);
             /*
              * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2454,16 +2456,19 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
              * later from the main thread, so doing the injection of
              * the error would be more complicated.
              */
+            g_array_append_vals(addresses, &paddr, 1);
             if (code == BUS_MCEERR_AR) {
                 kvm_cpu_synchronize_state(c);
                 if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             paddr)) {
+                                             addresses)) {
                     kvm_inject_arm_sea(c);
                 } else {
                     error_report("failed to record the error");
                     abort();
                 }
             }
+
+            g_array_free(addresses, true);
             return;
         }
         if (code == BUS_MCEERR_AO) {
#3 lore raw

Re: [PATCH RESEND v2 1/3] acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs

Quoted 75 lines · On Fri, 31 Oct 2025 09:58:50 +0000 Jonathan Cameron…
Quoted 3 lines · On Tue, 7 Oct 2025 16:08:08 +1000 Gavin Shan <[email protected]> wrote:

In the situation where host and guest has 64KB and 4KB page sizes, one error on the host's page affects 16 guest's pages. we need to send 16 consective errors in this specific case.

Hi Gavin,

Sorry this one has been on my to review list far too long.

Quoted 4 lines

Extend acpi_ghes_memory_errors() to support multiple CPERs after the hunk of code to generate the GHES error status is pulled out from ghes_gen_err_data_uncorrectable_recoverable().

I think this description needs to be more detailed wrt to how those multiple CPERs are handled. Specifically that they are in a single error status block (so should only represent related errors.)

This is to make it clear this isn't queuing events, but instead just presenting them as one block.

Quoted 22 lines

No functional changes intended.

---
 hw/acpi/ghes-stub.c    |  2 +-
 hw/acpi/ghes.c         | 27 ++++++++++++++-------------
 include/hw/acpi/ghes.h |  2 +-
 target/arm/kvm.c       |  7 ++++++-
 4 files changed, 22 insertions(+), 16 deletions(-)  
hw/acpi/ghes.c +1 -2
index 06555905ce..045b77715f 100644
@@ -214,18 +214,13 @@ static void acpi_ghes_build_append_mem_cper(GArray *table,
 
 static void
 ghes_gen_err_data_uncorrectable_recoverable(GArray *block,
-                                            const uint8_t *section_type,
-                                            int data_length)
+                                            const uint8_t *section_type)

hw/acpi/ghes.c static void acpi_ghes_build_append_mem_cper(GArray *table, · line 228

Quoted 10 lines
hw/acpi/ghes.c +0 -4
 {
     /* invalid fru id: ACPI 4.0: 17.3.2.6.1 Generic Error Data,
      * Table 17-13 Generic Error Data Entry
      */
     QemuUUID fru_id = {};
 
-    /* Build the new generic error status block header */
-    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE,
-        0, 0, data_length, ACPI_CPER_SEV_RECOVERABLE);
-]  

With this bit gone, is it worth having the helper? Perhaps just move the remains to where it is called.

Quoted 16 lines
hw/acpi/ghes.c +0 -0
     /* Build this new generic error data entry header */
     acpi_ghes_generic_error_data(block, section_type,
         ACPI_CPER_SEV_RECOVERABLE, 0, 0,  
target/arm/kvm.c +1 -0
index 4f769d69b3..9a47ac9e3a 100644
@@ -2434,6 +2434,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
     ram_addr_t ram_addr;
     hwaddr paddr;
     AcpiGhesState *ags;
+    GArray *addresses;
 
     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
Quoted 7 lines

target/arm/kvm.c void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) · line 2446

Quoted 5 lines
target/arm/kvm.c +1 -0
@@ -2442,6 +2443,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
         ram_addr = qemu_ram_addr_from_host(addr);
         if (ram_addr != RAM_ADDR_INVALID &&
             kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
+            addresses = g_array_new(false, false, sizeof(paddr));  

Given you are going to free in all paths, maybe a g_autofree?

Oddly there is no use of g_auto() with g_array in qemu. Ah well, next suggestion is my preference anyway.

Quoted 29 lines

Also, we know this only grows to a fixed max size (16 after patch 3), so maybe just provide a hwaddr paddrs[16]; and pass forwards the count?

Quoted 24 lines
target/arm/kvm.c +4 -1
             kvm_hwpoison_page_add(ram_addr);
             /*
              * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2454,16 +2456,19 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
              * later from the main thread, so doing the injection of
              * the error would be more complicated.
              */
+            g_array_append_vals(addresses, &paddr, 1);
             if (code == BUS_MCEERR_AR) {
                 kvm_cpu_synchronize_state(c);
                 if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             paddr)) {
+                                             addresses)) {
                     kvm_inject_arm_sea(c);
                 } else {
                     error_report("failed to record the error");
                     abort();
                 }
             }
+
+            g_array_free(addresses, true);
             return;
         }
         if (code == BUS_MCEERR_AO) {  
author
#4 lore raw

Re: [PATCH RESEND v2 1/3] acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs

Hi Jonathan,

Quoted 6 lines · Jonathan Cameron
Quoted 3 lines · On Fri, 31 Oct 2025 09:58:50 +0000 Jonathan Cameron…

On Tue, 7 Oct 2025 16:08:08 +1000
Gavin Shan <[email protected]> wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

In the situation where host and guest has 64KB and 4KB page sizes, one error on the host's page affects 16 guest's pages. we need to send 16 consective errors in this specific case.

Hi Gavin,

Sorry this one has been on my to review list far too long.

No worries. Thanks for your review and comments. Igor suggested to have separate error source for each vCPU. In that way, there will have multiple read_ack_reg and the specific issue addressed by this series can be resolved.

Answering your question below.

Quoted 40 lines
Quoted 40 lines
Quoted 4 lines

Extend acpi_ghes_memory_errors() to support multiple CPERs after the hunk of code to generate the GHES error status is pulled out from ghes_gen_err_data_uncorrectable_recoverable().

I think this description needs to be more detailed wrt to how those multiple CPERs are handled. Specifically that they are in a single error status block (so should only represent related errors.)

This is to make it clear this isn't queuing events, but instead just presenting them as one block.

Quoted 28 lines

No functional changes intended.

---
  hw/acpi/ghes-stub.c    |  2 +-
  hw/acpi/ghes.c         | 27 ++++++++++++++-------------
  include/hw/acpi/ghes.h |  2 +-
  target/arm/kvm.c       |  7 ++++++-
  4 files changed, 22 insertions(+), 16 deletions(-)
hw/acpi/ghes.c +1 -2
index 06555905ce..045b77715f 100644
@@ -214,18 +214,13 @@ static void acpi_ghes_build_append_mem_cper(GArray *table,
 
  static void
  ghes_gen_err_data_uncorrectable_recoverable(GArray *block,
-                                            const uint8_t *section_type,
-                                            int data_length)
+                                            const uint8_t *section_type)
  {
      /* invalid fru id: ACPI 4.0: 17.3.2.6.1 Generic Error Data,
       * Table 17-13 Generic Error Data Entry
       */
      QemuUUID fru_id = {};
 
Quoted 8 lines
Quoted 8 lines

hw/acpi/ghes.c static void acpi_ghes_build_append_mem_cper(GArray *table,

Quoted 4 lines
hw/acpi/ghes.c +0 -4
-    /* Build the new generic error status block header */
-    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE,
-        0, 0, data_length, ACPI_CPER_SEV_RECOVERABLE);
-]

With this bit gone, is it worth having the helper? Perhaps just move the remains to where it is called.

Ack.

Quoted 24 lines
Quoted 16 lines
Quoted 16 lines
hw/acpi/ghes.c +0 -0
      /* Build this new generic error data entry header */
      acpi_ghes_generic_error_data(block, section_type,
          ACPI_CPER_SEV_RECOVERABLE, 0, 0,
target/arm/kvm.c +1 -0
index 4f769d69b3..9a47ac9e3a 100644
@@ -2434,6 +2434,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
      ram_addr_t ram_addr;
      hwaddr paddr;
      AcpiGhesState *ags;
+    GArray *addresses;
 
      assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
Quoted 7 lines

target/arm/kvm.c void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) · line 2446

Quoted 5 lines
target/arm/kvm.c +1 -0
@@ -2442,6 +2443,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
          ram_addr = qemu_ram_addr_from_host(addr);
          if (ram_addr != RAM_ADDR_INVALID &&
              kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
+            addresses = g_array_new(false, false, sizeof(paddr));

Given you are going to free in all paths, maybe a g_autofree?

Quoted 3 lines

Oddly there is no use of g_auto() with g_array in qemu. Ah well, next suggestion is my preference anyway.

Something like below can be used, and GArray is interchangeable to a regular array. I guess GArray is preferred in QEMU.

g_autoptr(GArray) sources = g_array_new(false, true,
sizeof(AcpiNotificationSourceId));

Quoted 21 lines
Quoted 21 lines

Also, we know this only grows to a fixed max size (16 after patch 3), so maybe just provide a hwaddr paddrs[16]; and pass forwards the count?

Quoted 17 lines
target/arm/kvm.c +2 -1
              kvm_hwpoison_page_add(ram_addr);
              /*
               * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2454,16 +2456,19 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
               * later from the main thread, so doing the injection of
               * the error would be more complicated.
               */
+            g_array_append_vals(addresses, &paddr, 1);
              if (code == BUS_MCEERR_AR) {
                  kvm_cpu_synchronize_state(c);
                  if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             paddr)) {
+                                             addresses)) {
                      kvm_inject_arm_sea(c);
                  } else {
                      error_report("failed to record the error");
                      abort();
Quoted 8 lines
Quoted 8 lines

target/arm/kvm.c void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) · line 2474

Quoted 7 lines
target/arm/kvm.c +2 -0
                  }
              }
+
+            g_array_free(addresses, true);
              return;
          }
          if (code == BUS_MCEERR_AO) {

Thanks,
Gavin

#5 lore raw

Re: [PATCH RESEND v2 1/3] acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs

In reply to Gavin Shan
Quoted 80 lines · On Tue, 7 Oct 2025 16:08:08 +1000 Gavin Shan <[email protected]> wrote:

In the situation where host and guest has 64KB and 4KB page sizes, one error on the host's page affects 16 guest's pages. we need to send 16 consective errors in this specific case.

Extend acpi_ghes_memory_errors() to support multiple CPERs after the hunk of code to generate the GHES error status is pulled out from ghes_gen_err_data_uncorrectable_recoverable().

No functional changes intended.

---
 hw/acpi/ghes-stub.c    |  2 +-
 hw/acpi/ghes.c         | 27 ++++++++++++++-------------
 include/hw/acpi/ghes.h |  2 +-
 target/arm/kvm.c       |  7 ++++++-
 4 files changed, 22 insertions(+), 16 deletions(-)
hw/acpi/ghes-stub.c +1 -1
index 40f660c246..c1f8c9bec9 100644
@@ -12,7 +12,7 @@
 #include "hw/acpi/ghes.h"
 
 int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t physical_address)
+                            GArray *addresses)
 {
     return -1;
 }
hw/acpi/ghes.c +5 -9
index 06555905ce..045b77715f 100644
@@ -214,18 +214,13 @@ static void acpi_ghes_build_append_mem_cper(GArray *table,
 
 static void
 ghes_gen_err_data_uncorrectable_recoverable(GArray *block,
-                                            const uint8_t *section_type,
-                                            int data_length)
+                                            const uint8_t *section_type)
 {
     /* invalid fru id: ACPI 4.0: 17.3.2.6.1 Generic Error Data,
      * Table 17-13 Generic Error Data Entry
      */
     QemuUUID fru_id = {};
 
-    /* Build the new generic error status block header */
-    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE,
-        0, 0, data_length, ACPI_CPER_SEV_RECOVERABLE);
-
     /* Build this new generic error data entry header */
     acpi_ghes_generic_error_data(block, section_type,
         ACPI_CPER_SEV_RECOVERABLE, 0, 0,
@@ -557,19 +552,20 @@ void ghes_record_cper_errors(AcpiGhesState *ags, const void *cper, size_t len,
 }
 
 int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t physical_address)
+                            GArray *addresses)
 {
     /* Memory Error Section Type */
     const uint8_t guid[] =
           UUID_LE(0xA5BC1114, 0x6F64, 0x4EDE, 0xB8, 0x63, 0x3E, 0x83, \
                   0xED, 0x7C, 0x83, 0xB1);
     Error *errp = NULL;
-    int data_length;
+    int data_length, i;
     GArray *block;
 
     block = g_array_new(false, true /* clear */, 1);
 
-    data_length = ACPI_GHES_DATA_LENGTH + ACPI_GHES_MEM_CPER_LENGTH;
+    data_length = addresses->len *
+                  (ACPI_GHES_DATA_LENGTH + ACPI_GHES_MEM_CPER_LENGTH);
     /*
      * It should not run out of the preallocated memory if adding a new generic
      * error data entry

hw/acpi/ghes.c int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id, · line 577

Quoted 9 lines
hw/acpi/ghes.c +2 -4
@@ -577,10 +573,15 @@ int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
     assert((data_length + ACPI_GHES_GESB_SIZE) <=
             ACPI_GHES_MAX_RAW_DATA_LENGTH);
 
-    ghes_gen_err_data_uncorrectable_recoverable(block, guid, data_length);
-
-    /* Build the memory section CPER for above new generic error data entry */
-    acpi_ghes_build_append_mem_cper(block, physical_address);
+    /* Build the new generic error status block header */
+    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE, 0, 0,
                                             ^^^^^

with following loop, it might be no enough. See ACPI6.5 Tables 18.11: Status field

Don't we need to set multiple_foo bit(s) and also fix 'Error Data Entry Count' bits?

Quoted 65 lines
hw/acpi/ghes.c +7 -0
+                                   data_length, ACPI_CPER_SEV_RECOVERABLE);
+    for (i = 0; i < addresses->len; i++) {
+        ghes_gen_err_data_uncorrectable_recoverable(block, guid);
+        /* Memory section CPER on top of the generic error data entry */
+        acpi_ghes_build_append_mem_cper(block,
+                                        g_array_index(addresses, uint64_t, i));
+    }
 
 
     /* Report the error */
     ghes_record_cper_errors(ags, block->data, block->len, source_id, &errp);
include/hw/acpi/ghes.h +1 -1
index df2ecbf6e4..a8cbc520d5 100644
@@ -99,7 +99,7 @@ void acpi_build_hest(AcpiGhesState *ags, GArray *table_data,
 void acpi_ghes_add_fw_cfg(AcpiGhesState *vms, FWCfgState *s,
                           GArray *hardware_errors);
 int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t error_physical_addr);
+                            GArray *addresses);
 void ghes_record_cper_errors(AcpiGhesState *ags, const void *cper, size_t len,
                              uint16_t source_id, Error **errp);
 
target/arm/kvm.c +6 -1
index 4f769d69b3..9a47ac9e3a 100644
@@ -2434,6 +2434,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
     ram_addr_t ram_addr;
     hwaddr paddr;
     AcpiGhesState *ags;
+    GArray *addresses;
 
     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
@@ -2442,6 +2443,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
         ram_addr = qemu_ram_addr_from_host(addr);
         if (ram_addr != RAM_ADDR_INVALID &&
             kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
+            addresses = g_array_new(false, false, sizeof(paddr));
             kvm_hwpoison_page_add(ram_addr);
             /*
              * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2454,16 +2456,19 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
              * later from the main thread, so doing the injection of
              * the error would be more complicated.
              */
+            g_array_append_vals(addresses, &paddr, 1);
             if (code == BUS_MCEERR_AR) {
                 kvm_cpu_synchronize_state(c);
                 if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             paddr)) {
+                                             addresses)) {
                     kvm_inject_arm_sea(c);
                 } else {
                     error_report("failed to record the error");
                     abort();
                 }
             }
+
+            g_array_free(addresses, true);
             return;
         }
         if (code == BUS_MCEERR_AO) {
author
#6 lore raw

Re: [PATCH RESEND v2 1/3] acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs

Quoted 93 lines · Igor Mammedov
Quoted 80 lines · On Tue, 7 Oct 2025 16:08:08 +1000 Gavin Shan <[email protected]> wrote:

In the situation where host and guest has 64KB and 4KB page sizes, one error on the host's page affects 16 guest's pages. we need to send 16 consective errors in this specific case.

Extend acpi_ghes_memory_errors() to support multiple CPERs after the hunk of code to generate the GHES error status is pulled out from ghes_gen_err_data_uncorrectable_recoverable().

No functional changes intended.

---
  hw/acpi/ghes-stub.c    |  2 +-
  hw/acpi/ghes.c         | 27 ++++++++++++++-------------
  include/hw/acpi/ghes.h |  2 +-
  target/arm/kvm.c       |  7 ++++++-
  4 files changed, 22 insertions(+), 16 deletions(-)
hw/acpi/ghes-stub.c +1 -1
index 40f660c246..c1f8c9bec9 100644
@@ -12,7 +12,7 @@
  #include "hw/acpi/ghes.h"
 
  int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t physical_address)
+                            GArray *addresses)
  {
      return -1;
  }
hw/acpi/ghes.c +5 -9
index 06555905ce..045b77715f 100644
@@ -214,18 +214,13 @@ static void acpi_ghes_build_append_mem_cper(GArray *table,
 
  static void
  ghes_gen_err_data_uncorrectable_recoverable(GArray *block,
-                                            const uint8_t *section_type,
-                                            int data_length)
+                                            const uint8_t *section_type)
  {
      /* invalid fru id: ACPI 4.0: 17.3.2.6.1 Generic Error Data,
       * Table 17-13 Generic Error Data Entry
       */
      QemuUUID fru_id = {};
 
-    /* Build the new generic error status block header */
-    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE,
-        0, 0, data_length, ACPI_CPER_SEV_RECOVERABLE);
-
      /* Build this new generic error data entry header */
      acpi_ghes_generic_error_data(block, section_type,
          ACPI_CPER_SEV_RECOVERABLE, 0, 0,
@@ -557,19 +552,20 @@ void ghes_record_cper_errors(AcpiGhesState *ags, const void *cper, size_t len,
  }
 
  int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t physical_address)
+                            GArray *addresses)
  {
      /* Memory Error Section Type */
      const uint8_t guid[] =
            UUID_LE(0xA5BC1114, 0x6F64, 0x4EDE, 0xB8, 0x63, 0x3E, 0x83, \
                    0xED, 0x7C, 0x83, 0xB1);
      Error *errp = NULL;
-    int data_length;
+    int data_length, i;
      GArray *block;
 
      block = g_array_new(false, true /* clear */, 1);
 
-    data_length = ACPI_GHES_DATA_LENGTH + ACPI_GHES_MEM_CPER_LENGTH;
+    data_length = addresses->len *
+                  (ACPI_GHES_DATA_LENGTH + ACPI_GHES_MEM_CPER_LENGTH);
      /*
       * It should not run out of the preallocated memory if adding a new generic
       * error data entry

hw/acpi/ghes.c int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id, · line 577

Quoted 9 lines
hw/acpi/ghes.c +2 -4
@@ -577,10 +573,15 @@ int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
      assert((data_length + ACPI_GHES_GESB_SIZE) <=
              ACPI_GHES_MAX_RAW_DATA_LENGTH);
 
-    ghes_gen_err_data_uncorrectable_recoverable(block, guid, data_length);
-
-    /* Build the memory section CPER for above new generic error data entry */
-    acpi_ghes_build_append_mem_cper(block, physical_address);
+    /* Build the new generic error status block header */
+    acpi_ghes_generic_error_status(block, ACPI_GEBS_UNCORRECTABLE, 0, 0,
                                              ^^^^^
Quoted 4 lines

with following loop, it might be no enough. See ACPI6.5 Tables 18.11: Status field

Don't we need to set multiple_foo bit(s) and also fix 'Error Data Entry Count' bits?

Ack, those two fields need to be fixed accordingly.

Quoted 57 lines
Quoted 57 lines
hw/acpi/ghes.c +7 -0
+                                   data_length, ACPI_CPER_SEV_RECOVERABLE);
+    for (i = 0; i < addresses->len; i++) {
+        ghes_gen_err_data_uncorrectable_recoverable(block, guid);
+        /* Memory section CPER on top of the generic error data entry */
+        acpi_ghes_build_append_mem_cper(block,
+                                        g_array_index(addresses, uint64_t, i));
+    }
 
 
      /* Report the error */
      ghes_record_cper_errors(ags, block->data, block->len, source_id, &errp);
include/hw/acpi/ghes.h +1 -1
index df2ecbf6e4..a8cbc520d5 100644
@@ -99,7 +99,7 @@ void acpi_build_hest(AcpiGhesState *ags, GArray *table_data,
  void acpi_ghes_add_fw_cfg(AcpiGhesState *vms, FWCfgState *s,
                            GArray *hardware_errors);
  int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
-                            uint64_t error_physical_addr);
+                            GArray *addresses);
  void ghes_record_cper_errors(AcpiGhesState *ags, const void *cper, size_t len,
                               uint16_t source_id, Error **errp);
 
target/arm/kvm.c +4 -1
index 4f769d69b3..9a47ac9e3a 100644
@@ -2434,6 +2434,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
      ram_addr_t ram_addr;
      hwaddr paddr;
      AcpiGhesState *ags;
+    GArray *addresses;
 
      assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
@@ -2442,6 +2443,7 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
          ram_addr = qemu_ram_addr_from_host(addr);
          if (ram_addr != RAM_ADDR_INVALID &&
              kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
+            addresses = g_array_new(false, false, sizeof(paddr));
              kvm_hwpoison_page_add(ram_addr);
              /*
               * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2454,16 +2456,19 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
               * later from the main thread, so doing the injection of
               * the error would be more complicated.
               */
+            g_array_append_vals(addresses, &paddr, 1);
              if (code == BUS_MCEERR_AR) {
                  kvm_cpu_synchronize_state(c);
                  if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             paddr)) {
+                                             addresses)) {
                      kvm_inject_arm_sea(c);
                  } else {
                      error_report("failed to record the error");
Quoted 8 lines

target/arm/kvm.c void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) · line 2474

Quoted 8 lines
target/arm/kvm.c +2 -0
                      abort();
                  }
              }
+
+            g_array_free(addresses, true);
              return;
          }
          if (code == BUS_MCEERR_AO) {

Thanks,
Gavin

author
#7 lore raw

PATCH RESEND v2 2/3 kvm/arm/kvm: Introduce helper push_ghes_memory_errors()

In reply to Gavin Shan

Introduce helper push_ghes_memory_errors(), which sends ACPI GHES memory errors, injects SEA exception or aborts on errors. This function will be extended to support multiple ACPI GHES memory errors in the next path.

No functional changes intended.

---
 target/arm/kvm.c | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)
target/arm/kvm.c +24 -12
index 9a47ac9e3a..c5d5b3b16e 100644
@@ -2429,12 +2429,34 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp)
     return ret;
 }
 
+static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
+                                    uint64_t paddr)
+{
+    GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    int ret;
+
+    kvm_cpu_synchronize_state(c);
+    g_array_append_vals(addresses, &paddr, 1);
+    ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
+    if (ret) {
+        goto error;
+    }
+
+    kvm_inject_arm_sea(c);
+
+    g_array_free(addresses, true);
+
+    return;
+error:
+    error_report("failed to record the error");
+    abort();
+}
+
 void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
 {
     ram_addr_t ram_addr;
     hwaddr paddr;
     AcpiGhesState *ags;
-    GArray *addresses;
 
     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
@@ -2443,7 +2465,6 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
         ram_addr = qemu_ram_addr_from_host(addr);
         if (ram_addr != RAM_ADDR_INVALID &&
             kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
-            addresses = g_array_new(false, false, sizeof(paddr));
             kvm_hwpoison_page_add(ram_addr);
             /*
              * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2456,19 +2477,10 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
              * later from the main thread, so doing the injection of
              * the error would be more complicated.
              */
-            g_array_append_vals(addresses, &paddr, 1);
             if (code == BUS_MCEERR_AR) {
-                kvm_cpu_synchronize_state(c);
-                if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             addresses)) {
-                    kvm_inject_arm_sea(c);
-                } else {
-                    error_report("failed to record the error");
-                    abort();
-                }
+                push_ghes_memory_errors(c, ags, paddr);
             }
 
-            g_array_free(addresses, true);
             return;
         }
         if (code == BUS_MCEERR_AO) {
Signature · 1 line
2.51.0
#8 lore raw

Re: [PATCH RESEND v2 2/3] kvm/arm/kvm: Introduce helper push_ghes_memory_errors()

Quoted 17 lines · On Tue, 7 Oct 2025 16:08:09 +1000 Gavin Shan <[email protected]> wrote:

Introduce helper push_ghes_memory_errors(), which sends ACPI GHES memory errors, injects SEA exception or aborts on errors. This function will be extended to support multiple ACPI GHES memory errors in the next path.

No functional changes intended.

---
 target/arm/kvm.c | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)
target/arm/kvm.c +0 -0
index 9a47ac9e3a..c5d5b3b16e 100644

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2433

Quoted 5 lines
target/arm/kvm.c +2 -0
@@ -2429,12 +2429,34 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp)
     return ret;
 }
 
+static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
+                                    uint64_t paddr)

Why not hwaddr paddr?

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2435

Quoted 2 lines
target/arm/kvm.c +2 -0
+{
+    GArray *addresses = g_array_new(false, false, sizeof(paddr));

As in previous I'd just have

	hwaddr paddrs[16];

rather than bothering with a g_array.

Quoted 6 lines
target/arm/kvm.c +6 -0
+    int ret;
+
+    kvm_cpu_synchronize_state(c);
+    g_array_append_vals(addresses, &paddr, 1);
+    ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
+    if (ret) {

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2451

Quoted 10 lines
target/arm/kvm.c +10 -0
+        goto error;
+    }
+
+    kvm_inject_arm_sea(c);
+
+    g_array_free(addresses, true);
+
+    return;
+error:
+    error_report("failed to record the error");

I'd just do this inline at the error case. In the next patch you add a more specific report of why to another path that would then be followed by this.

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2452

Quoted 1 line
target/arm/kvm.c +1 -0
+    abort();

If you do the above with the message, just duplicate this in the two error paths (by end of next patch).

Quoted 1 line
target/arm/kvm.c +1 -0
+}
author
#9 lore raw

Re: [PATCH RESEND v2 2/3] kvm/arm/kvm: Introduce helper push_ghes_memory_errors()

Quoted 23 lines · Jonathan Cameron
Quoted 20 lines · On Tue, 7 Oct 2025 16:08:09 +1000 Gavin Shan <[email protected]> wrote:

Introduce helper push_ghes_memory_errors(), which sends ACPI GHES memory errors, injects SEA exception or aborts on errors. This function will be extended to support multiple ACPI GHES memory errors in the next path.

No functional changes intended.

---
  target/arm/kvm.c | 36 ++++++++++++++++++++++++------------
  1 file changed, 24 insertions(+), 12 deletions(-)
target/arm/kvm.c +0 -0
index 9a47ac9e3a..c5d5b3b16e 100644
@@ -2429,12 +2429,34 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp)
      return ret;
  }
 
Quoted 5 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2433

Quoted 2 lines
target/arm/kvm.c +2 -0
+static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
+                                    uint64_t paddr)

Why not hwaddr paddr?

Because acpi_ghes_memory_errors() accepts it as uint64_t.

Quoted 8 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2435

Quoted 2 lines
target/arm/kvm.c +2 -0
+{
+    GArray *addresses = g_array_new(false, false, sizeof(paddr));

As in previous I'd just have

	hwaddr paddrs[16];

rather than bothering with a g_array.

Ok.

Quoted 12 lines
Quoted 12 lines
target/arm/kvm.c +12 -0
+    int ret;
+
+    kvm_cpu_synchronize_state(c);
+    g_array_append_vals(addresses, &paddr, 1);
+    ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
+    if (ret) {
+        goto error;
+    }
+
+    kvm_inject_arm_sea(c);
+
+    g_array_free(addresses, true);
Quoted 9 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2451

Quoted 4 lines
target/arm/kvm.c +4 -0
+
+    return;
+error:
+    error_report("failed to record the error");

I'd just do this inline at the error case. In the next patch you add a more specific report of why to another path that would then be followed by this.

Ok.

Quoted 5 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2452

Quoted 1 line
target/arm/kvm.c +1 -0
+    abort();

If you do the above with the message, just duplicate this in the two error paths (by end of next patch).

Will correct this in next revision if we still take current design. Igor suggested to have individual error source per vCPU in another thread.

Quoted 2 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2453

Quoted 1 line
target/arm/kvm.c +1 -0
+}

Thanks,
Gavin

#10 lore raw

Re: [PATCH RESEND v2 2/3] kvm/arm/kvm: Introduce helper push_ghes_memory_errors()

Quoted 24 lines · On Mon, 3 Nov 2025 09:39:50 +1000 Gavin Shan <[email protected]> wrote:
Quoted 23 lines · Jonathan Cameron
Quoted 20 lines · On Tue, 7 Oct 2025 16:08:09 +1000 Gavin Shan <[email protected]> wrote:

Introduce helper push_ghes_memory_errors(), which sends ACPI GHES memory errors, injects SEA exception or aborts on errors. This function will be extended to support multiple ACPI GHES memory errors in the next path.

No functional changes intended.

---
  target/arm/kvm.c | 36 ++++++++++++++++++++++++------------
  1 file changed, 24 insertions(+), 12 deletions(-)
target/arm/kvm.c +0 -0
index 9a47ac9e3a..c5d5b3b16e 100644
@@ -2429,12 +2429,34 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp)
      return ret;
  }
 
Quoted 7 lines
Quoted 5 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2433

Quoted 2 lines
target/arm/kvm.c +2 -0
+static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
+                                    uint64_t paddr)  

Why not hwaddr paddr?

Because acpi_ghes_memory_errors() accepts it as uint64_t.

ack to that, it's uint64_t in spec so I'd stick to that.

Quoted 50 lines
Quoted 8 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2435

Quoted 2 lines
target/arm/kvm.c +2 -0
+{
+    GArray *addresses = g_array_new(false, false, sizeof(paddr));  

As in previous I'd just have

	hwaddr paddrs[16];

rather than bothering with a g_array.

Ok.

Quoted 12 lines
Quoted 12 lines
target/arm/kvm.c +12 -0
+    int ret;
+
+    kvm_cpu_synchronize_state(c);
+    g_array_append_vals(addresses, &paddr, 1);
+    ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
+    if (ret) {
+        goto error;
+    }
+
+    kvm_inject_arm_sea(c);
+
+    g_array_free(addresses, true);
Quoted 9 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2451

Quoted 4 lines
target/arm/kvm.c +4 -0
+
+    return;
+error:
+    error_report("failed to record the error");  

I'd just do this inline at the error case. In the next patch you add a more specific report of why to another path that would then be followed by this.

Ok.

Quoted 5 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2452

Quoted 1 line
target/arm/kvm.c +1 -0
+    abort();  

If you do the above with the message, just duplicate this in the two error paths (by end of next patch).

Will correct this in next revision if we still take current design. Igor suggested to have individual error source per vCPU in another thread.

Quoted 2 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2453

Quoted 1 line
target/arm/kvm.c +1 -0
+}  

Thanks,
Gavin

#11 lore raw

Re: [PATCH RESEND v2 2/3] kvm/arm/kvm: Introduce helper push_ghes_memory_errors()

In reply to Gavin Shan
Quoted 21 lines · On Tue, 7 Oct 2025 16:08:09 +1000 Gavin Shan <[email protected]> wrote:

Introduce helper push_ghes_memory_errors(), which sends ACPI GHES memory errors, injects SEA exception or aborts on errors. This function will be extended to support multiple ACPI GHES memory errors in the next path.

No functional changes intended.

---
 target/arm/kvm.c | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)
target/arm/kvm.c +1 -0
index 9a47ac9e3a..c5d5b3b16e 100644
@@ -2429,12 +2429,34 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp)
     return ret;
 }
 
+static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2442

Quoted 10 lines
target/arm/kvm.c +10 -0
+                                    uint64_t paddr)
+{
+    GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    int ret;
+
+    kvm_cpu_synchronize_state(c);
+    g_array_append_vals(addresses, &paddr, 1);
+    ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
+    if (ret) {
+        goto error;

perhaps use &error_abort and use it right here instead of goto or even more cleaner: pass &error_abort as arg to acpi_ghes_memory_errors() and drop not needed 'if's & return value

Quoted 50 lines
target/arm/kvm.c +13 -12
+    }
+
+    kvm_inject_arm_sea(c);
+
+    g_array_free(addresses, true);
+
+    return;
+error:
+    error_report("failed to record the error");
+    abort();
+}
+
 void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
 {
     ram_addr_t ram_addr;
     hwaddr paddr;
     AcpiGhesState *ags;
-    GArray *addresses;
 
     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
@@ -2443,7 +2465,6 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
         ram_addr = qemu_ram_addr_from_host(addr);
         if (ram_addr != RAM_ADDR_INVALID &&
             kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
-            addresses = g_array_new(false, false, sizeof(paddr));
             kvm_hwpoison_page_add(ram_addr);
             /*
              * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2456,19 +2477,10 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
              * later from the main thread, so doing the injection of
              * the error would be more complicated.
              */
-            g_array_append_vals(addresses, &paddr, 1);
             if (code == BUS_MCEERR_AR) {
-                kvm_cpu_synchronize_state(c);
-                if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             addresses)) {
-                    kvm_inject_arm_sea(c);
-                } else {
-                    error_report("failed to record the error");
-                    abort();
-                }
+                push_ghes_memory_errors(c, ags, paddr);
             }
 
-            g_array_free(addresses, true);
             return;
         }
         if (code == BUS_MCEERR_AO) {
author
#12 lore raw

Re: [PATCH RESEND v2 2/3] kvm/arm/kvm: Introduce helper push_ghes_memory_errors()

Quoted 23 lines · Igor Mammedov
Quoted 20 lines · On Tue, 7 Oct 2025 16:08:09 +1000 Gavin Shan <[email protected]> wrote:

Introduce helper push_ghes_memory_errors(), which sends ACPI GHES memory errors, injects SEA exception or aborts on errors. This function will be extended to support multiple ACPI GHES memory errors in the next path.

No functional changes intended.

---
  target/arm/kvm.c | 36 ++++++++++++++++++++++++------------
  1 file changed, 24 insertions(+), 12 deletions(-)
target/arm/kvm.c +0 -0
index 9a47ac9e3a..c5d5b3b16e 100644
@@ -2429,12 +2429,34 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp)
      return ret;
  }
 
Quoted 16 lines

target/arm/kvm.c int kvm_arch_get_registers(CPUState *cs, Error **errp) · line 2442

Quoted 11 lines
target/arm/kvm.c +11 -0
+static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
+                                    uint64_t paddr)
+{
+    GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    int ret;
+
+    kvm_cpu_synchronize_state(c);
+    g_array_append_vals(addresses, &paddr, 1);
+    ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
+    if (ret) {
+        goto error;

perhaps use &error_abort and use it right here instead of goto or even more cleaner: pass &error_abort as arg to acpi_ghes_memory_errors() and drop not needed 'if's & return value

Right, the second way looks cleaner with the assumption that abort is expected on any errors in this call path. I will clean it up in next respin.

Note the error handling in acpi_ghes_memory_errors() seems already problematic.

acpi_ghes_memory_errors // Declare errp
ghes_record_cper_errors
ghes_record_cper_errors // error is initialized by error_setg
error_setg // !read_ack_register

Quoted 46 lines
Quoted 46 lines
target/arm/kvm.c +13 -11
+    }
+
+    kvm_inject_arm_sea(c);
+
+    g_array_free(addresses, true);
+
+    return;
+error:
+    error_report("failed to record the error");
+    abort();
+}
+
  void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
  {
      ram_addr_t ram_addr;
      hwaddr paddr;
      AcpiGhesState *ags;
-    GArray *addresses;
 
      assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
 
@@ -2443,7 +2465,6 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
          ram_addr = qemu_ram_addr_from_host(addr);
          if (ram_addr != RAM_ADDR_INVALID &&
              kvm_physical_memory_addr_from_host(c->kvm_state, addr, &paddr)) {
-            addresses = g_array_new(false, false, sizeof(paddr));
              kvm_hwpoison_page_add(ram_addr);
              /*
               * If this is a BUS_MCEERR_AR, we know we have been called
@@ -2456,19 +2477,10 @@ void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
               * later from the main thread, so doing the injection of
               * the error would be more complicated.
               */
-            g_array_append_vals(addresses, &paddr, 1);
              if (code == BUS_MCEERR_AR) {
-                kvm_cpu_synchronize_state(c);
-                if (!acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC,
-                                             addresses)) {
-                    kvm_inject_arm_sea(c);
-                } else {
-                    error_report("failed to record the error");
-                    abort();
-                }
+                push_ghes_memory_errors(c, ags, paddr);
              }
 
Quoted 4 lines

target/arm/kvm.c void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) · line 2486

Quoted 4 lines
target/arm/kvm.c +0 -1
-            g_array_free(addresses, true);
              return;
          }
          if (code == BUS_MCEERR_AO) {

Thanks,
Gavin

author
#13 lore raw

PATCH RESEND v2 3/3 target/arm/kvm: Support multiple memory CPERs injection

In reply to Gavin Shan

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
 hw/acpi/ghes.c   |  2 +-
 target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
 #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
 /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
 /* Generic Hardware Error Source version 2 */
 #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1

61 lines not on this page · raw message

Signature · 1 line
2.51.0
#14 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Em Tue, 7 Oct 2025 16:08:10 +1000
Gavin Shan <[email protected]> escreveu:

Quoted 22 lines

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
 hw/acpi/ghes.c   |  2 +-
 target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +0 -0
index 045b77715f..5c87b3a027 100644

hw/acpi/ghes.c line 36

Quoted 5 lines
hw/acpi/ghes.c +1 -1
@@ -33,7 +33,7 @@
 #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
 /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)

I had a patch doing the same on my queue. Anyway, I'm OK if you do it, but don't forget to also update the docs:

docs/specs/acpi_hest_ghes.rst +1 -1
index aaf7b1ad11a5..acf31d6eeb7c 100644
@@ -68,7 +68,7 @@ Design Details
     and N Read Ack Register entries. The size for each entry is 8-byte.
     The Error Status Data Block table contains N Error Status Data Block
     entries. The size for each entry is defined at the source code as
-    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 1024 bytes). The total size
+    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 4096 bytes). The total size
     for the "etc/hardware_errors" fw_cfg blob is
     (N * 8 * 2 + N * ACPI_GHES_MAX_RAW_DATA_LENGTH) bytes.
     N is the number of the kinds of hardware error sources.

Btw, IMO better to place th4 4K size change on a separate patch.

That's said, as GHES table is now part of ACPI tests, you need to have a patch before/after GHES table changes to update BIOS test.

You'll likely need something similar to those:

8d5613d2eefa ("tests/acpi: virt: add an empty HEST file") cd16f08ad4bd ("tests/acpi: virt: update HEST file with its current data")

There are more details about how to do it at the comments on this file:

tests/qtest/bios-tables-test.c

Thanks,
Mauro

---

Btw, this is the patch I had increasing the size. It was submitted arlready on one of the several version releases, but Igor asked me to postpone it to sent it after having the main stuff merged.

[PATCH] hw/acpi/ghes: increase max CPER size to 4K

The max limit there is just made up, and it is not in sync with what is specified at acpi_hest_ghes.rst.

Increase it to 4K to match what's written there.

Tested with this fake CPER:

    GUID: e19e3d16-bc11-11e4-9caa-c2051d5d46b0
    CPER:
      00000000  05 00 00 00 08 00 01 00 44 0f 00 00 00 00 00 00   ........D.......
      00000010  00 00 00 80 00 00 00 00 10 05 0f 00 00 00 00 00   ................
      00000020  00 00 00 00 00 00 00 00 00 20 04 00 02 01 00 03   ......... ......
      00000030  0f 00 91 00 00 00 00 00 ef be ad de 00 00 00 00   ................
      00000040  ad 0b ba ab 00 00 00 00 00 20 04 00 04 01 00 03   ......... ......
      00000050  7f 00 54 00 00 00 00 00 ef be ad de 00 00 00 00   ..T.............
      00000060  ad 0b ba ab 00 00 00 00 00 20 04 00 08 01 00 03   ......... ......
      00000070  ff 0f 46 d6 80 00 00 00 ef be ad de 00 00 00 00   ..F.............
      00000080  ad 0b ba ab 00 00 00 00 00 20 04 00 10 01 00 03   ......... ......
      00000090  ff 03 da 78 00 00 00 00 ef be ad de 00 00 00 00   ...x............
      000000a0  ad 0b ba ab 00 00 00 00 00 20 04 00 02 01 00 03   ......... ......
      000000b0  0f 00 91 00 00 00 00 00 ef be ad de 00 00 00 00   ................
      000000c0  ad 0b ba ab 00 00 00 00 00 20 04 00 04 01 00 03   ......... ......
      000000d0  7f 00 54 00 00 00 00 00 ef be ad de 00 00 00 00   ..T.............
      000000e0  ad 0b ba ab 00 00 00 00 00 20 04 00 08 01 00 03   ......... ......
      000000f0  ff 0f 46 d6 80 00 00 00 ef be ad de 00 00 00 00   ..F.............
      00000100  ad 0b ba ab 00 00 00 00 00 20 04 00 10 01 00 04   ......... ......
      00000110  ff 04 da 78 00 00 00 00 ef be ad de 00 00 00 00   ...x............
      00000120  ad 0b ba ab 00 00 00 00 00 00 04 00 00 01 00 00   ................
      00000130  ef be ad de 00 00 00 00 00 00 00 00 00 00 00 00   ................
      00000140  00 00 10 04 0f 00 00 00 00 00 00 00 00 00 00 00   ................
      00000150  00 20 04 00 02 01 00 0f 00 00 00 00 00 00 ef be   . ..............
      00000160  ad de 00 00 00 ad 0b ba 00 00 00 00 00 20 04 00   ............. ..
      00000170  04 01 00 7f 00 54 00 00 00 00 ef be ad de 00 00   .....T..........
      00000180  00 ad 0b ba ab 00 00 00 00 20 04 00 08 01 00 ff   ......... ......
      00000190  0f 46 d6 80 00 00 ef be ad de 00 00 00 ad 0b ba   .F..............
      000001a0  ab 00 00 00 00 20 04 00 10 01 00 ff 03 da 78 00   ..... ........x.
      000001b0  00 00 00 be ad de 00 00 00 ad 0b ba ab 00 00 00   ................
      000001c0  00 00 04 00 02 01 00 0f 00 91 00 00 00 00 00 ef   ................
      000001d0  be de 00 00 00 ad 0b ba ab 00 00 00 00 00 20 04   .............. .
      000001e0  04 01 00 7f 00 54 00 00 00 00 00 ef be ad de 00   .....T..........
      000001f0  00 ad 0b ba ab 00 00 00 00 00 20 04 00 08 00 ff   .......... .....
      00000200  0f 46 d6 80 00 00 00 ef be ad de 00 00 ad 0b ba   .F..............
      00000210  ab 00 00 00 00 00 20 04 00 10 01 00 03 da 78 00   ...... .......x.
      00000220  00 00 00 ef be ad de 00 00 00 ad ba ab 00 00 00   ................
      00000230  00 de ad be 05 00 00 00 01 00 00 28 02 00 00 00   ...........(....
      00000240  00 00 00 00 80 00 00 00 00 05 0f 00 00 00 00 00   ................
      00000250  00 00 00 00 00 00 00 20 00 02 01 00 0f 00 00 00   ....... ........
      00000260  00 00 00 ef be ad de 00 00 8f 71 96 1c 12 fe 95   ..........q.....
      00000270  80 a0 10 36 04 6e 43 3d 1d 1c 31 09 2d 13 bd 5e   ...6.nC=..1.-..^
      00000280  dc e2 45 e9 1f 37 ec 09 ab 4c 35 41 93 e8 04 a7   ..E..7...L5A....
      00000290  cd 05 50 c1 c7 03 55 a1 78 f3 95 c5 98 85 84 1f   ..P...U.x.......
      000002a0  a1 b7 b9 cd e6 9b 0b 89 0d f5 61 8f 71 96 8a 1c   ..........a.q...
      000002b0  12 fe a0 10 36 04 6e fe 43 3d 1d 1c e9 31 09 2d   ....6.n.C=...1.-
      000002c0  13 dc e2 45 e9 1f e7 37 ec 09 00 ab 4c 35 41 e8   ...E...7....L5A.
      000002d0  a7 cd 05 50 c1 f8 c7 03 73 55 a1 78 f3 c5 98 84   ...P....sU.x....
      000002e0  1f a1 b7 b9 58 cd c4 e6 9b 0b 89 f5 61 8f 96 8a   ....X.......a...
      000002f0  1c 12 fe 95 80 a0 10 36 04 fe 43 3d 1d e9 31 09   .......6..C=..1.
      00000300  2d 13 bd 5e dc e2 45 1f e7 37 ec 09 ab 4c 35 41   -..^..E..7...L5A
      00000310  93 e8 04 a7 cd 50 c1 f8 c7 03 73 a1 78 f3 95 c5   .....P....s.x...
      00000320  98 85 84 a1 b7 b9 58 cd c4 e6 0b 89 0d f5 61 05   ......X.......a.
      00000330  00 00 01 00 00 00 48 00 00 00 00 00 00 00 00 00   ......H.........
      00000340  00 00 00 10 05 0f 00 00 00 00 00 00 00 00 00 00   ................
      00000350  00 20 04 00 02 01 00 00 91 00 00 00 00 ef be ad   . ..............
      00000360  de 00 00 00 8f 71 8a 1c 12 95 80 a0 10 36 04 6e   .....q.......6.n
      00000370  fe 43 3d 1d 1c 31 09 13 bd 5e dc e2 45 e9 1f e7   .C=..1...^..E...
      00000380  37 ec 09 00 4c 41 93 e8 04 a7 cd 05 50 c1 f8 c7   7...LA......P...
      00000390  03 73 55 f3 95 c5 98 85 84 1f a1 b7 b9 58 cd c4   .sU..........X..
      000003a0  e6 9b 0d f5 61 8f 71 96 8a 1c 12 fe 95 80 a0 10   ....a.q.........
      000003b0  04 fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e dc 45 e9   ..C=...1.-..^.E.
      000003c0  e7 37 ec 09 00 ab 4c 35 41 93 e8 04 cd 05 50 f8   .7....L5A.....P.
      000003d0  c7 03 73 55 a1 78 f3 95 c5 98 84 1f a1 b7 58 cd   ..sU.x........X.
      000003e0  c4 e6 9b 0b 89 0d f5 61 71 96 8a 1c 12 95 80 a0   .......aq.......
      000003f0  10 36 04 6e fe 43 1d 1c e9 31 09 2d bd 5e dc e2   .6.n.C...1.-.^..
      00000400  45 e9 1f e7 ec 09 00 ab 4c 35 41 e8 04 a7 cd 05   E.......L5A.....
      00000410  50 c1 c7 03 73 55 a1 78 f3 95 98 85 84 1f a1 b7   P...sU.x........
      00000420  58 cd c4 e6 9b 0b 89 0d f5 05 00 00 00 01 00 00   X...............
      00000430  48 00 00 00 00 00 00 00 00 80 00 00 00 10 05 0f   H...............
      00000440  00 00 00 00 00 00 00 00 00 00 00 20 04 00 02 01   ........... ....
      00000450  00 0f 00 91 00 00 00 00 be ad de 00 00 00 8f 71   ...............q
      00000460  96 8a 1c 12 fe 80 10 36 04 6e fe 43 3d 1d 1c e9   .......6.n.C=...
      00000470  31 09 2d 13 dc e2 45 e9 1f e7 37 ec 09 00 ab 4c   1.-...E...7....L
      00000480  35 41 93 a7 cd 05 50 c1 f8 c7 03 73 55 a1 78 f3   5A....P....sU.x.
      00000490  95 98 84 1f a1 b7 b9 58 cd c4 e6 9b 0b 89 0d 61   .......X.......a
      000004a0  8f 96 8a 1c 12 fe 95 80 a0 10 36 04 6e 43 3d 1d   ..........6.nC=.
      000004b0  e9 31 09 2d 13 bd 5e dc e2 45 e9 e7 37 ec 09 ab   .1.-..^..E..7...
      000004c0  4c 35 41 93 e8 04 a7 cd 05 c1 f8 c7 03 73 a1 78   L5A..........s.x
      000004d0  f3 95 c5 98 85 84 1f b7 b9 58 cd c4 e6 0b 89 0d   .........X......
      000004e0  f5 61 8f 71 96 1c 12 fe 95 80 a0 10 04 6e fe 43   .a.q.........n.C
      000004f0  3d 1d 1c 31 09 2d 13 bd 5e dc e2 e9 1f e7 37 ec   =..1.-..^.....7.
      00000500  09 ab 4c 35 41 93 e8 04 a7 cd 50 c1 f8 c7 03 55   ..L5A.....P....U
      00000510  a1 78 f3 95 c5 98 85 84 1f b7 b9 58 cd e6 9b 0b   .x.........X....
      00000520  89 0d f5 61 05 00 00 00 00 00 00 00 00 00 00 00   ...a............
      00000530  00 00 00 00 80 00 00 00 10 0f 00 00 00 00 00 00   ................
      00000540  00 00 00 00 00 00 20 00 02 01 00 0f 00 91 00 00   ...... .........
      00000550  00 00 00 ef be 00 00 00 8f 71 96 8a 1c 12 fe 95   .........q......
      00000560  80 a0 10 36 fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e   ...6.C=...1.-..^
      00000570  dc e2 e9 e7 37 ec 09 00 ab 4c 35 41 93 e8 04 a7   ....7....L5A....
      00000580  05 50 f8 c7 03 73 55 a1 78 f3 95 c5 98 85 1f a1   .P...sU.x.......
      00000590  b7 58 cd c4 e6 9b 0b 89 0d f5 61 8f 96 8a 1c 12   .X........a.....
      000005a0  95 80 a0 10 36 04 6e fe 43 3d 1c e9 31 09 2d bd   ....6.n.C=..1.-.
      000005b0  5e dc e2 45 e9 1f e7 37 09 00 ab 4c 35 41 0b 89   ^..E...7...L5A..
      000005c0  0d f5 61 8f 71 96 1c 12 fe 95 80 a0 10 04 6e fe   ..a.q.........n.
      000005d0  43 3d 1d 1c 31 09 2d 13 bd 5e dc e2 e9 1f e7 37   C=..1.-..^.....7
      000005e0  ec 09 ab 4c 35 41 93 e8 04 a7 cd 50 c1 f8 c7 03   ...L5A.....P....
      000005f0  55 a1 78 f3 95 c5 98 85 84 1f b7 b9 58 cd e6 9b   U.x.........X...
      00000600  0b 89 0d f5 61 05 00 00 00 00 00 00 00 00 00 00   ....a...........
      00000610  00 00 00 00 00 80 00 00 00 10 0f 00 00 00 00 00   ................
      00000620  00 00 00 00 00 00 00 20 00 02 01 00 0f 00 91 00   ....... ........
      00000630  00 00 00 00 ef be 00 00 00 8f 71 96 8a 1c 12 fe   ..........q.....
      00000640  95 80 a0 10 36 fe 43 3d 1d 1c e9 31 09 2d 13 bd   ....6.C=...1.-..
      00000650  5e dc e2 e9 e7 37 ec 09 00 ab 4c 35 41 93 e8 04   ^....7....L5A...
      00000660  a7 05 50 f8 c7 03 73 55 a1 78 f3 95 c5 98 85 1f   ..P...sU.x......
      00000670  a1 b7 58 cd c4 e6 9b 0b 89 0d f5 61 8f 96 8a 1c   ..X........a....
      00000680  12 95 80 a0 10 36 04 6e fe 43 3d 1c e9 31 09 2d   .....6.n.C=..1.-
      00000690  bd 5e dc e2 45 e9 1f e7 37 09 00 ab 4c 35 41 e8   .^..E...7...L5A.
      000006a0  04 a7 cd 05 50 c1 f8 03 73 55 a1 78 f3 95 98 85   ....P...sU.x....
      000006b0  84 1f a1 b7 b9 cd c4 e6 9b 0b 89 0d f5 8f 71 96   ..............q.
      000006c0  8a 1c 12 95 80 a0 10 36 04 6e fe 43 1d 1c e9 31   .......6.n.C...1
      000006d0  09 13 bd 5e dc e2 45 e9 1f e7 37 09 00 ab 4c 41   ...^..E...7...LA
      000006e0  93 e8 04 a7 cd 05 50 c1 f8 c7 73 55 a1 f3 95 c5   ......P...sU....
      000006f0  98 85 84 1f a1 b7 b9 58 cd e6 9b 89 0d f5 98 85   .......X........
      00000700  84 1f a1 b7 b9 58 cd c4 9b 0b 89 0d 61 8f 71 96   .....X......a.q.
      00000710  8a 1c 12 fe 95 80 a0 36 04 6e 43 3d 1d 1c e9 31   .......6.nC=...1
      00000720  09 2d 13 bd 5e dc 45 e9 e7 37 ec 09 00 ab 4c 35   .-..^.E..7....L5
      00000730  41 93 e8 04 a7 05 c1 f8 c7 03 73 55 a1 78 f3 95   A.........sU.x..
      00000740  c5 98 85 84 b7 b9 58 cd c4 e6 9b 0b 89 0d f5 61   ......X........a
      00000750  8f 71 96 12 fe 95 80 a0 10 36 04 6e fe 43 3d 1d   .q.......6.n.C=.
      00000760  1c 31 2d 13 bd 5e dc e2 45 e9 1f e7 37 ec 09 ab   .1-..^..E...7...
      00000770  4c 41 93 e8 04 a7 cd 05 50 c1 f8 c7 03 55 a1 78   LA......P....U.x
      00000780  95 c5 98 85 84 1f a1 b7 b9 58 cd 98 85 84 1f b7   .........X......
      00000790  b9 58 cd c4 e6 9b 0b 89 0d 61 8f 71 96 8a 12 fe   .X.......a.q....
      000007a0  95 80 a0 10 36 04 6e 43 3d 1d 1c e9 31 2d 13 bd   ....6.nC=...1-..
      000007b0  5e dc e2 45 e9 e7 37 ec 09 00 ab 4c 41 93 e8 04   ^..E..7....LA...
      000007c0  a7 cd 05 c1 f8 c7 03 73 55 a1 78 95 c5 98 85 84   .......sU.x.....
      000007d0  1f b7 b9 58 cd c4 e6 9b 0b 89 f5 61 8f 71 96 1c   ...X.......a.q..
      000007e0  12 fe 95 80 a0 10 36 04 6e 43 3d 1d 1c 31 09 2d   ......6.nC=..1.-
      000007f0  13 bd 5e dc e2 45 e9 1f 37 ec 09 ab 4c 35 41 93   ..^..E..7...L5A.
      00000800  e8 04 a7 cd 05 50 c1 c7 03 55 a1 78 f3 95 c5 98   .....P...U.x....
      00000810  85 84 1f a1 b7 b9 cd 50 c1 f8 c7 03 73 55 a1 78   .......P....sU.x
      00000820  f3 95 c5 98 85 a1 b7 b9 58 cd c4 e6 9b 0b 89 0d   ........X.......
      00000830  f5 61 05 00 01 00 00 00 48 00 00 00 00 00 00 00   .a......H.......
      00000840  00 00 00 00 00 10 05 0f 00 00 00 00 00 00 00 00   ................
      00000850  00 00 00 20 04 00 02 01 00 0f 00 91 00 00 00 00   ... ............
      00000860  ef ad de 00 00 00 8f 71 96 8a 1c 12 95 80 a0 10   .......q........
      00000870  04 6e fe 43 3d 1d 1c e9 31 09 13 bd 5e dc e2 e9   .n.C=...1...^...
      00000880  1f e7 37 ec 09 00 ab 4c 41 93 e8 04 a7 cd 50 c1   ..7....LA.....P.
      00000890  f8 c7 03 73 55 a1 f3 95 c5 98 85 84 1f b7 b9 58   ...sU..........X
      000008a0  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
      000008b0  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
      000008c0  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
      000008d0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
      000008e0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
      000008f0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
      00000900  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
      00000910  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
      00000920  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
      00000930  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
      00000940  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
      00000950  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
      00000960  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
      00000970  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
      00000980  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 b7 b9 58   .L5A.....P.....X
      00000990  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
      000009a0  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
      000009b0  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
      000009c0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
      000009d0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
      000009e0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
      000009f0  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
      00000a00  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
      00000a10  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
      00000a20  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
      00000a30  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
      00000a40  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
      00000a50  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
      00000a60  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
      00000a70  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 b7 b9 58   .L5A.....P.....X
      00000a80  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
      00000a90  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
      00000aa0  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
      00000ab0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
      00000ac0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
      00000ad0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
      00000ae0  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
      00000af0  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
      00000b00  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
      00000b10  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
      00000b20  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
      00000b30  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
      00000b40  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
      00000b50  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
      00000b60  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 b7 b9 58   .L5A.....P.....X
      00000b70  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
      00000b80  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
      00000b90  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
      00000ba0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
      00000bb0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
      00000bc0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
      00000bd0  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
      00000be0  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
      00000bf0  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
      00000c00  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
      00000c10  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
      00000c20  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
      00000c30  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
      00000c40  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
      00000c50  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 96 8a 1c   .L5A.....P......
      00000c60  12 fe 95 80 a0 10 36 04 fe 43 3d 1d e9 31 09 2d   ......6..C=..1.-
      00000c70  13 bd 5e dc e2 45 1f e7 37 ec 09 ab 4c 35 41 93   ..^..E..7...L5A.
      00000c80  e8 04 a7 cd 50 c1 f8 c7 03 73 a1 78 f3 95 c5 98   ....P....s.x....
      00000c90  85 84 a1 b7 b9 58 cd c4 e6 0b 89 0d f5 61 05 00   .....X.......a..
      00000ca0  00 01 00 00 00 48 00 00 00 00 00 00 00 00 00 00   .....H..........
      00000cb0  00 00 10 05 0f 00 00 00 00 00 00 00 00 00 00 00   ................
      00000cc0  20 04 00 02 01 00 00 91 00 00 00 00 ef be ad de    ...............
      00000cd0  00 00 00 8f 71 8a 1c 12 95 80 a0 10 36 04 6e fe   ....q.......6.n.
      00000ce0  43 3d 1d 1c 31 09 13 bd 5e dc e2 45 e9 1f e7 37   C=..1...^..E...7
      00000cf0  ec 09 00 4c 41 93 e8 04 a7 cd 05 50 c1 f8 c7 03   ...LA......P....
      00000d00  73 55 f3 95 c5 98 85 84 1f a1 b7 b9 58 cd c4 e6   sU..........X...
      00000d10  9b 0d f5 61 8f 71 96 8a 1c 12 fe 95 80 a0 10 04   ...a.q..........
      00000d20  fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e dc 45 e9 e7   .C=...1.-..^.E..
      00000d30  37 ec 09 00 ab 4c 35 41 93 e8 04 cd 05 50 f8 c7   7....L5A.....P..
      00000d40  03 73 55 a1 78 f3 95 c5 98 84 1f a1 b7 58 cd c4   .sU.x........X..
      00000d50  e6 9b 0b 89 0d f5 61 71 96 8a 1c 12 95 80 a0 10   ......aq........
      00000d60  36 04 6e fe 43 1d 1c e9 31 09 2d bd 5e dc e2 45   6.n.C...1.-.^..E
      00000d70  e9 1f e7 ec 09 00 ab 4c 35 41 e8 04 a7 cd 05 50   .......L5A.....P
      00000d80  c1 c7 03 73 55 a1 78 f3 95 98 85 84 1f a1 b7 58   ...sU.x........X
      00000d90  cd c4 e6 9b 0b 89 0d f5 05 00 00 00 01 00 00 48   ...............H
      00000da0  00 00 00 00 00 00 00 00 80 00 00 00 10 05 0f 00   ................
      00000db0  00 00 00 00 00 00 00 00 00 00 20 04 00 02 01 00   .......... .....
      00000dc0  0f 00 91 00 00 00 00 be ad de 00 00 00 8f 71 96   ..............q.
      00000dd0  8a 1c 12 fe 80 10 36 04 6e fe 43 3d 1d 1c e9 31   ......6.n.C=...1
      00000de0  09 2d 13 dc e2 45 e9 1f e7 37 ec 09 00 ab 4c 35   .-...E...7....L5
      00000df0  41 93 a7 cd 05 50 c1 f8 c7 03 73 55 a1 78 f3 95   A....P....sU.x..
      00000e00  98 84 1f a1 b7 b9 58 cd c4 e6 9b 0b 89 0d 61 8f   ......X.......a.
      00000e10  96 8a 1c 12 fe 95 80 a0 10 36 04 6e 43 3d 1d e9   .........6.nC=..
      00000e20  31 09 2d 13 bd 5e dc e2 45 e9 e7 37 ec 09 ab 4c   1.-..^..E..7...L
      00000e30  35 41 93 e8 04 a7 cd 05 c1 f8 c7 03 73 a1 78 f3   5A..........s.x.
      00000e40  95 c5 98 85 84 1f b7 b9 58 cd c4 e6 0b 89 0d f5   ........X.......
      00000e50  61 8f 71 96 1c 12 fe 95 80 a0 10 04 6e fe 43 3d   a.q.........n.C=
      00000e60  1d 1c 31 09 2d 13 bd 5e dc e2 e9 1f e7 37 ec 09   ..1.-..^.....7..
      00000e70  ab 4c 35 41 93 e8 04 a7 cd 50 c1 f8 c7 03 55 a1   .L5A.....P....U.
      00000e80  78 f3 95 c5 98 85 84 1f b7 b9 58 cd e6 9b 0b 89   x.........X.....
      00000e90  0d f5 61 05 00 00 00 00 00 00 00 00 00 00 00 00   ..a.............
      00000ea0  00 00 00 80 00 00 00 10 0f 00 00 00 00 00 00 00   ................
      00000eb0  00 00 00 00 00 20 00 02 01 00 0f 00 91 00 00 00   ..... ..........
      00000ec0  00 00 ef be 00 00 00 8f 71 96 8a 1c 12 fe 95 80   ........q.......
      00000ed0  a0 10 36 fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e dc   ..6.C=...1.-..^.
      00000ee0  e2 e9 e7 37 ec 09 00 ab 4c 35 41 93 e8 04 a7 05   ...7....L5A.....
      00000ef0  50 f8 c7 03 73 55 a1 78 f3 95 c5 98 85 1f a1 b7   P...sU.x........

And checked that Linux Kernel indeed received a big CPER:

Hardware error from APEI Generic Hardware Error Source: 1
event severity: recoverable
Error 0, type: recoverable
section_type: ARM processor error
MIDR: 0x00000000000f0510
Multiprocessor Affinity Register (MPIDR): 0x0000000080000000
running state: 0x0
Power State Coordination Interface state: 0
Error info structure 0:
num errors: 2
error_type: 0x02: cache error
error_info: 0x000000000091000f
transaction type: Data Access
cache error, operation type: Data write
cache level: 2
processor context not corrupted
Error info structure 1:
num errors: 2
error_type: 0x04: TLB error
error_info: 0x000000000054007f
transaction type: Instruction
TLB error, operation type: Instruction fetch
TLB level: 1
processor context not corrupted
the error has not been corrected
PC is imprecise
Error info structure 2:
num errors: 2
error_type: 0x08: bus error
error_info: 0x00000080d6460fff
transaction type: Generic
bus error, operation type: Generic read (type of instruction or data request cannot be determined) affinity level at which the bus error occurred: 1
processor context corrupted
the error has been corrected
PC is imprecise
Program execution can be restarted reliably at the PC associated with the error. participation type: Local processor observed
request timed out
address space: External Memory Access
memory access attributes:0x20
access mode: secure
Error info structure 3:
num errors: 2

    error_type: 0x10: micro-architectural error
    error_info: 0x0000000078da03ff
   Error info structure 4:
   num errors: 2
    error_type: 0x02: cache error
    error_info: 0x000000000091000f
     transaction type: Data Access
     cache error, operation type: Data write
     cache level: 2
     processor context not corrupted
   Error info structure 5:
   num errors: 2
    error_type: 0x04: TLB error
    error_info: 0x000000000054007f
     transaction type: Instruction
     TLB error, operation type: Instruction fetch
     TLB level: 1
     processor context not corrupted
     the error has not been corrected
     PC is imprecise
   Error info structure 6:
   num errors: 2
    error_type: 0x08: bus error
    error_info: 0x00000080d6460fff
     transaction type: Generic
     bus error, operation type: Generic read (type of instruction or data request cannot be determined)
     affinity level at which the bus error occurred: 1
     processor context corrupted
     the error has been corrected
     PC is imprecise
     Program execution can be restarted reliably at the PC associated with the error.
     participation type: Local processor observed
     request timed out
     address space: External Memory Access
     memory access attributes:0x20
     access mode: secure
   Error info structure 7:
   num errors: 2
    error_type: 0x10: micro-architectural error
    error_info: 0x0000000078da04ff
   Context info structure 0:
    register context type: AArch64 general purpose registers
    00000000: deadbeef 00000000 00000000 00000000
    00000010: 04100000 0000000f 00000000 00000000
    00000020: 00042000 0f000102 00000000 beef0000
    00000030: 0000dead ba0bad00 00000000 00042000
    00000040: 7f000104 00005400 beef0000 0000dead
    00000050: ba0bad00 000000ab 00042000 ff000108
    00000060: 80d6460f beef0000 0000dead ba0bad00
    00000070: 000000ab 00042000 ff000110 0078da03
    00000080: be000000 0000dead ba0bad00 000000ab
    00000090: 00040000 0f000102 00009100 ef000000
    000000a0: 0000debe ba0bad00 000000ab 04200000
    000000b0: 7f000104 00005400 ef000000 00deadbe
    000000c0: ba0bad00 000000ab 04200000 ff000800
    000000d0: 80d6460f ef000000 00deadbe ba0bad00
    000000e0: 000000ab 04200000 00011000 0078da03
    000000f0: ef000000 00deadbe baad0000 000000ab
   Vendor specific error info has 3280 bytes:
    00000000: beadde00 00000005 28000001 00000002  ...........(....
    00000010: 00000000 00000080 000f0500 00000000  ................
    00000020: 00000000 20000000 00010200 0000000f  ....... ........
    00000030: ef000000 00deadbe 96718f00 95fe121c  ..........q.....
    00000040: 3610a080 3d436e04 09311c1d 5ebd132d  ...6.nC=..1.-..^
    00000050: e945e2dc 09ec371f 41354cab a704e893  ..E..7...L5A....
    00000060: c15005cd a15503c7 c595f378 1f848598  ..P...U.x.......
    00000070: cdb9b7a1 890b9be6 8f61f50d 1c8a9671  ..........a.q...
    00000080: 10a0fe12 fe6e0436 1c1d3d43 2d0931e9  ....6.n.C=...1.-
    00000090: 45e2dc13 37e71fe9 ab0009ec e841354c  ...E...7....L5A.
    000000a0: 5005cda7 03c7f8c1 78a15573 8498c5f3  ...P....sU.x....
    000000b0: b9b7a11f e6c4cd58 f5890b9b 8a968f61  ....X.......a...
    000000c0: 95fe121c 3610a080 3d43fe04 0931e91d  .......6..C=..1.
    000000d0: 5ebd132d 1f45e2dc 09ec37e7 41354cab  -..^..E..7...L5A
    000000e0: a704e893 f8c150cd a17303c7 c595f378  .....P....s.x...
    000000f0: a1848598 cd58b9b7 890be6c4 0561f50d  ......X.......a.
    00000100: 00010000 00480000 00000000 00000000  ......H.........
    00000110: 10000000 00000f05 00000000 00000000  ................
    00000120: 00042000 00000102 00000091 adbeef00  . ..............
    00000130: 000000de 1c8a718f a0809512 6e043610  .....q.......6.n
    00000140: 1d3d43fe 1309311c e2dc5ebd e71fe945  .C=..1...^..E...
    00000150: 0009ec37 e893414c 05cda704 c7f8c150  7...LA......P...
    00000160: f3557303 8598c595 b7a11f84 c4cd58b9  .sU..........X..
    00000170: f50d9be6 96718f61 fe121c8a 10a08095  ....a.q.........
    00000180: 3d43fe04 31e91c1d bd132d09 e945dc5e  ..C=...1.-..^.E.
    00000190: 09ec37e7 354cab00 04e89341 f85005cd  .7....L5A.....P.
    000001a0: 557303c7 95f378a1 1f8498c5 cd58b7a1  ..sU.x........X.
    000001b0: 0b9be6c4 61f50d89 1c8a9671 a0809512  .......aq.......
    000001c0: 6e043610 1c1d43fe 2d0931e9 e2dc5ebd  .6.n.C...1.-.^..
    000001d0: e71fe945 ab0009ec e841354c 05cda704  E.......L5A.....
    000001e0: 03c7c150 78a15573 859895f3 b7a11f84  P...sU.x........
    000001f0: e6c4cd58 0d890b9b 000005f5 00000100  X...............
    00000200: 00000048 00000000 00008000 0f051000  H...............
    00000210: 00000000 00000000 20000000 01020004  ........... ....
    00000220: 91000f00 00000000 00deadbe 718f0000  ...............q
    00000230: 121c8a96 361080fe 43fe6e04 e91c1d3d  .......6.n.C=...
    00000240: 132d0931 e945e2dc ec37e71f 4cab0009  1.-...E...7....L
    00000250: a7934135 c15005cd 7303c7f8 f378a155  5A....P....sU.x.
    00000260: 1f849895 58b9b7a1 9be6c4cd 610d890b  .......X.......a
    00000270: 1c8a968f 8095fe12 043610a0 1d3d436e  ..........6.nC=.
    00000280: 2d0931e9 dc5ebd13 e7e945e2 ab09ec37  .1.-..^..E..7...
    00000290: 9341354c cda704e8 c7f8c105 78a17303  L5A..........s.x
    000002a0: 98c595f3 b71f8485 c4cd58b9 0d890be6  .........X......
    000002b0: 718f61f5 fe121c96 10a08095 43fe6e04  .a.q.........n.C
    000002c0: 311c1d3d bd132d09 e9e2dc5e ec37e71f  =..1.-..^.....7.
    000002d0: 354cab09 04e89341 c150cda7 5503c7f8  ..L5A.....P....U
    000002e0: 95f378a1 848598c5 58b9b71f 0b9be6cd  .x.........X....
    000002f0: 61f50d89 00000005 00000000 00000000  ...a............
    00000300: 00000000 00000080 00000f10 00000000  ................
    00000310: 00000000 00200000 0f000102 00009100  ...... .........
    00000320: ef000000 000000be 8a96718f 95fe121c  .........q......
    00000330: 3610a080 1d3d43fe 0931e91c 5ebd132d  ...6.C=...1.-..^
    00000340: e7e9e2dc 0009ec37 41354cab a704e893  ....7....L5A....
    00000350: c7f85005 a1557303 c595f378 a11f8598  .P...sU.x.......
    00000360: c4cd58b7 890b9be6 8f61f50d 121c8a96  .X........a.....
    00000370: 10a08095 fe6e0436 e91c3d43 bd2d0931  ....6.n.C=..1.-.
    00000380: 45e2dc5e 37e71fe9 4cab0009 890b4135  ^..E...7...L5A..
    00000390: 8f61f50d 121c9671 a08095fe fe6e0410  ..a.q.........n.
    000003a0: 1c1d3d43 132d0931 e2dc5ebd 37e71fe9  C=..1.-..^.....7
    000003b0: 4cab09ec e8934135 50cda704 03c7f8c1  ...L5A.....P....
    000003c0: f378a155 8598c595 b9b71f84 9be6cd58  U.x.........X...
    000003d0: f50d890b 00000561 00000000 00000000  ....a...........
    000003e0: 00000000 00008000 000f1000 00000000  ................
    000003f0: 00000000 20000000 00010200 0091000f  ....... ........
    00000400: 00000000 0000beef 96718f00 fe121c8a  ..........q.....
    00000410: 10a08095 3d43fe36 31e91c1d bd132d09  ....6.C=...1.-..
    00000420: e9e2dc5e 09ec37e7 354cab00 04e89341  ^....7....L5A...
    00000430: f85005a7 557303c7 95f378a1 1f8598c5  ..P...sU.x......
    00000440: cd58b7a1 0b9be6c4 61f50d89 1c8a968f  ..X........a....
    00000450: a0809512 6e043610 1c3d43fe 2d0931e9  .....6.n.C=..1.-
    00000460: e2dc5ebd e71fe945 ab000937 e841354c  .^..E...7...L5A.
    00000470: 05cda704 03f8c150 78a15573 859895f3  ....P...sU.x....
    00000480: b7a11f84 e6c4cdb9 0d890b9b 96718ff5  ..............q.
    00000490: 95121c8a 3610a080 43fe6e04 31e91c1d  .......6.n.C...1
    000004a0: 5ebd1309 e945e2dc 0937e71f 414cab00  ...^..E...7...LA
    000004b0: a704e893 c15005cd 5573c7f8 c595f3a1  ......P...sU....
    000004c0: 1f848598 58b9b7a1 899be6cd 8598f50d  .......X........
    000004d0: b7a11f84 c4cd58b9 0d890b9b 96718f61  .....X......a.q.
    000004e0: fe121c8a 36a08095 3d436e04 31e91c1d  .......6.nC=...1
    000004f0: bd132d09 e945dc5e 09ec37e7 354cab00  .-..^.E..7....L5
    00000500: 04e89341 f8c105a7 557303c7 95f378a1  A.........sU.x..
    00000510: 848598c5 cd58b9b7 0b9be6c4 61f50d89  ......X........a
    00000520: 1296718f a08095fe 6e043610 1d3d43fe  .q.......6.n.C=.
    00000530: 132d311c e2dc5ebd e71fe945 ab09ec37  .1-..^..E...7...
    00000540: e893414c 05cda704 c7f8c150 78a15503  LA......P....U.x
    00000550: 8598c595 b7a11f84 98cd58b9 b71f8485  .........X......
    00000560: c4cd58b9 890b9be6 718f610d fe128a96  .X.......a.q....
    00000570: 10a08095 436e0436 e91c1d3d bd132d31  ....6.nC=...1-..
    00000580: 45e2dc5e ec37e7e9 4cab0009 04e89341  ^..E..7....LA...
    00000590: c105cda7 7303c7f8 9578a155 848598c5  .......sU.x.....
    000005a0: 58b9b71f 9be6c4cd 61f5890b 1c96718f  ...X.......a.q..
    000005b0: 8095fe12 043610a0 1d3d436e 2d09311c  ......6.nC=..1.-
    000005c0: dc5ebd13 1fe945e2 ab09ec37 9341354c  ..^..E..7...L5A.
    000005d0: cda704e8 c7c15005 78a15503 98c595f3  .....P...U.x....
    000005e0: a11f8485 50cdb9b7 03c7f8c1 78a15573  .......P....sU.x
    000005f0: 98c595f3 b9b7a185 e6c4cd58 0d890b9b  ........X.......
    00000600: 000561f5 00000001 00000048 00000000  .a......H.......
    00000610: 00000000 0f051000 00000000 00000000  ................
    00000620: 20000000 01020004 91000f00 00000000  ... ............
    00000630: 00deadef 718f0000 121c8a96 10a08095  .......q........
    00000640: 43fe6e04 e91c1d3d bd130931 e9e2dc5e  .n.C=...1...^...
    00000650: ec37e71f 4cab0009 04e89341 c150cda7  ..7....LA.....P.
    00000660: 7303c7f8 95f3a155 848598c5 58b9b71f  ...sU..........X
    00000670: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
    00000680: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
    00000690: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
    000006a0: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
    000006b0: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
    000006c0: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
    000006d0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
    000006e0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
    000006f0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
    00000700: 00000001 00000000 00000000 00000080  ................
    00000710: 00000510 00000000 00000000 04200000  .............. .
    00000720: 0f000100 00009100 be000000 0000dead  ................
    00000730: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
    00000740: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
    00000750: 41354cab cda70493 f8c15005 58b9b7c7  .L5A.....P.....X
    00000760: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
    00000770: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
    00000780: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
    00000790: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
    000007a0: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
    000007b0: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
    000007c0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
    000007d0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
    000007e0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
    000007f0: 00000001 00000000 00000000 00000080  ................
    00000800: 00000510 00000000 00000000 04200000  .............. .
    00000810: 0f000100 00009100 be000000 0000dead  ................
    00000820: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
    00000830: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
    00000840: 41354cab cda70493 f8c15005 58b9b7c7  .L5A.....P.....X
    00000850: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
    00000860: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
    00000870: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
    00000880: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
    00000890: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
    000008a0: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
    000008b0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
    000008c0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
    000008d0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
    000008e0: 00000001 00000000 00000000 00000080  ................
    000008f0: 00000510 00000000 00000000 04200000  .............. .
    00000900: 0f000100 00009100 be000000 0000dead  ................
    00000910: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
    00000920: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
    00000930: 41354cab cda70493 f8c15005 58b9b7c7  .L5A.....P.....X
    00000940: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
    00000950: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
    00000960: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
    00000970: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
    00000980: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
    00000990: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
    000009a0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
    000009b0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
    000009c0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
    000009d0: 00000001 00000000 00000000 00000080  ................
    000009e0: 00000510 00000000 00000000 04200000  .............. .
    000009f0: 0f000100 00009100 be000000 0000dead  ................
    00000a00: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
    00000a10: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
    00000a20: 41354cab cda70493 f8c15005 1c8a96c7  .L5A.....P......
    00000a30: 8095fe12 043610a0 1d3d43fe 2d0931e9  ......6..C=..1.-
    00000a40: dc5ebd13 e71f45e2 ab09ec37 9341354c  ..^..E..7...L5A.
    00000a50: cda704e8 c7f8c150 78a17303 98c595f3  ....P....s.x....
    00000a60: b7a18485 c4cd58b9 0d890be6 000561f5  .....X.......a..
    00000a70: 00000100 00004800 00000000 00000000  .....H..........
    00000a80: 05100000 0000000f 00000000 00000000  ................
    00000a90: 02000420 91000001 00000000 deadbeef   ...............
    00000aa0: 8f000000 121c8a71 10a08095 fe6e0436  ....q.......6.n.
    00000ab0: 1c1d3d43 bd130931 45e2dc5e 37e71fe9  C=..1...^..E...7
    00000ac0: 4c0009ec 04e89341 5005cda7 03c7f8c1  ...LA......P....
    00000ad0: 95f35573 848598c5 b9b7a11f e6c4cd58  sU..........X...
    00000ae0: 61f50d9b 8a96718f 95fe121c 0410a080  ...a.q..........
    00000af0: 1d3d43fe 0931e91c 5ebd132d e7e945dc  .C=...1.-..^.E..
    00000b00: 0009ec37 41354cab cd04e893 c7f85005  7....L5A.....P..
    00000b10: a1557303 c595f378 a11f8498 c4cd58b7  .sU.x........X..
    00000b20: 890b9be6 7161f50d 121c8a96 10a08095  ......aq........
    00000b30: fe6e0436 e91c1d43 bd2d0931 45e2dc5e  6.n.C...1.-.^..E
    00000b40: ece71fe9 4cab0009 04e84135 5005cda7  .......L5A.....P
    00000b50: 7303c7c1 f378a155 84859895 58b7a11f  ...sU.x........X
    00000b60: 9be6c4cd f50d890b 00000005 48000001  ...............H
    00000b70: 00000000 00000000 00000080 000f0510  ................
    00000b80: 00000000 00000000 04200000 00010200  .......... .....
    00000b90: 0091000f be000000 0000dead 96718f00  ..............q.
    00000ba0: fe121c8a 04361080 3d43fe6e 31e91c1d  ......6.n.C=...1
    00000bb0: dc132d09 1fe945e2 09ec37e7 354cab00  .-...E...7....L5
    00000bc0: cda79341 f8c15005 557303c7 95f378a1  A....P....sU.x..
    00000bd0: a11f8498 cd58b9b7 0b9be6c4 8f610d89  ......X.......a.
    00000be0: 121c8a96 a08095fe 6e043610 e91d3d43  .........6.nC=..
    00000bf0: 132d0931 e2dc5ebd 37e7e945 4cab09ec  1.-..^..E..7...L
    00000c00: e8934135 05cda704 03c7f8c1 f378a173  5A..........s.x.
    00000c10: 8598c595 b9b71f84 e6c4cd58 f50d890b  ........X.......
    00000c20: 96718f61 95fe121c 0410a080 3d43fe6e  a.q.........n.C=
    00000c30: 09311c1d 5ebd132d 1fe9e2dc 09ec37e7  ..1.-..^.....7..
    00000c40: 41354cab a704e893 f8c150cd a15503c7  .L5A.....P....U.
    00000c50: c595f378 1f848598 cd58b9b7 890b9be6  x.........X.....
    00000c60: 0561f50d 00000000 00000000 00000000  ..a.............
    00000c70: 80000000 10000000 0000000f 00000000  ................
    00000c80: 00000000 02002000 000f0001 00000091  ..... ..........
    00000c90: beef0000 8f000000 1c8a9671 8095fe12  ........q.......
    00000ca0: fe3610a0 1c1d3d43 2d0931e9 dc5ebd13  ..6.C=...1.-..^.
    00000cb0: 37e7e9e2 ab0009ec 9341354c 05a704e8  ...7....L5A.....
    00000cc0: 03c7f850 78a15573 98c595f3 b7a11f85  P...sU.x........

GHES: Unhandled processor error type 0x02: cache error
GHES: Unhandled processor error type 0x04: TLB error
GHES: Unhandled processor error type 0x08: bus error
GHES: Unhandled processor error type 0x10: micro-architectural error
GHES: Unhandled processor error type 0x02: cache error
GHES: Unhandled processor error type 0x04: TLB error
GHES: Unhandled processor error type 0x08: bus error
GHES: Unhandled processor error type 0x10: micro-architectural error

docs/specs/acpi_hest_ghes.rst +1 -1
index aaf7b1ad11a5..acf31d6eeb7c 100644
@@ -68,7 +68,7 @@ Design Details
     and N Read Ack Register entries. The size for each entry is 8-byte.
     The Error Status Data Block table contains N Error Status Data Block
     entries. The size for each entry is defined at the source code as
-    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 1024 bytes). The total size
+    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 4096 bytes). The total size
     for the "etc/hardware_errors" fw_cfg blob is
     (N * 8 * 2 + N * ACPI_GHES_MAX_RAW_DATA_LENGTH) bytes.
     N is the number of the kinds of hardware error sources.
hw/acpi/ghes.c +1 -1
index d5d5ff7474f4..77631147cf21 100644
@@ -33,7 +33,7 @@
 #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
 /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
 /* Generic Hardware Error Source version 2 */
 #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
author
#15 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Hi Mauro,

Quoted 53 lines · Mauro Carvalho Chehab

Em Tue, 7 Oct 2025 16:08:10 +1000
Gavin Shan <[email protected]> escreveu:

Quoted 22 lines

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
  hw/acpi/ghes.c   |  2 +-
  target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
  2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +0 -0
index 045b77715f..5c87b3a027 100644

hw/acpi/ghes.c line 36

Quoted 5 lines
hw/acpi/ghes.c +1 -1
@@ -33,7 +33,7 @@
  #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
  /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)

I had a patch doing the same on my queue. Anyway, I'm OK if you do it, but don't forget to also update the docs:

docs/specs/acpi_hest_ghes.rst +1 -1
index aaf7b1ad11a5..acf31d6eeb7c 100644
@@ -68,7 +68,7 @@ Design Details
      and N Read Ack Register entries. The size for each entry is 8-byte.
      The Error Status Data Block table contains N Error Status Data Block
      entries. The size for each entry is defined at the source code as
-    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 1024 bytes). The total size
+    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 4096 bytes). The total size
      for the "etc/hardware_errors" fw_cfg blob is
      (N * 8 * 2 + N * ACPI_GHES_MAX_RAW_DATA_LENGTH) bytes.
      N is the number of the kinds of hardware error sources.

Btw, IMO better to place th4 4K size change on a separate patch.

That's said, as GHES table is now part of ACPI tests, you need to have a patch before/after GHES table changes to update BIOS test.

Quoted 9 lines

You'll likely need something similar to those:

8d5613d2eefa ("tests/acpi: virt: add an empty HEST file") cd16f08ad4bd ("tests/acpi: virt: update HEST file with its current data")

There are more details about how to do it at the comments on this file:

tests/qtest/bios-tables-test.c

Thanks for your comments and all of them make sense. I've changed the code locally and the changes will be included to next respin (v3), but I would defer posting (v3) until I receive enough feedbacks on other patches.

The modified local code is something as below.

[PATCH 1/6] tests/qtest/bios-tables-test: Prepare for changes in the HEST table [PATCH 2/6] acpi/ghes: Increase GHES raw data maximal length to 4KiB [PATCH 3/6] tests/qtest/bios-tables-test: Update HEST table
[PATCH 4/6] acpi/ghes: Extend acpi_ghes_memory_errors() to support multiple CPERs [PATCH 5/6] kvm/arm/kvm: Introduce helper push_ghes_memory_errors() [PATCH 6/6] target/arm/kvm: Support multiple memory CPERs injection

PATCH[1-3] increases GHES raw data maximal length to 4KiB. Document update in PATCH[2] PATCH[4-5] refactors the code, preparing to send 16 consective CPERs
PATCH[6] sends 16 consective CPERs when we have 64KiB/4KiB page sizes on host/guest.
No significant changes as to the current revision except minor to remove the 'error' tag in push_ghes_memory_errors().

Thanks,
Gavin

Quoted 610 lines

Thanks,
Mauro

---

Btw, this is the patch I had increasing the size. It was submitted arlready on one of the several version releases, but Igor asked me to postpone it to sent it after having the main stuff merged.

[PATCH] hw/acpi/ghes: increase max CPER size to 4K

The max limit there is just made up, and it is not in sync with what is specified at acpi_hest_ghes.rst.

Increase it to 4K to match what's written there.

Tested with this fake CPER:

     GUID: e19e3d16-bc11-11e4-9caa-c2051d5d46b0
     CPER:
       00000000  05 00 00 00 08 00 01 00 44 0f 00 00 00 00 00 00   ........D.......
       00000010  00 00 00 80 00 00 00 00 10 05 0f 00 00 00 00 00   ................
       00000020  00 00 00 00 00 00 00 00 00 20 04 00 02 01 00 03   ......... ......
       00000030  0f 00 91 00 00 00 00 00 ef be ad de 00 00 00 00   ................
       00000040  ad 0b ba ab 00 00 00 00 00 20 04 00 04 01 00 03   ......... ......
       00000050  7f 00 54 00 00 00 00 00 ef be ad de 00 00 00 00   ..T.............
       00000060  ad 0b ba ab 00 00 00 00 00 20 04 00 08 01 00 03   ......... ......
       00000070  ff 0f 46 d6 80 00 00 00 ef be ad de 00 00 00 00   ..F.............
       00000080  ad 0b ba ab 00 00 00 00 00 20 04 00 10 01 00 03   ......... ......
       00000090  ff 03 da 78 00 00 00 00 ef be ad de 00 00 00 00   ...x............
       000000a0  ad 0b ba ab 00 00 00 00 00 20 04 00 02 01 00 03   ......... ......
       000000b0  0f 00 91 00 00 00 00 00 ef be ad de 00 00 00 00   ................
       000000c0  ad 0b ba ab 00 00 00 00 00 20 04 00 04 01 00 03   ......... ......
       000000d0  7f 00 54 00 00 00 00 00 ef be ad de 00 00 00 00   ..T.............
       000000e0  ad 0b ba ab 00 00 00 00 00 20 04 00 08 01 00 03   ......... ......
       000000f0  ff 0f 46 d6 80 00 00 00 ef be ad de 00 00 00 00   ..F.............
       00000100  ad 0b ba ab 00 00 00 00 00 20 04 00 10 01 00 04   ......... ......
       00000110  ff 04 da 78 00 00 00 00 ef be ad de 00 00 00 00   ...x............
       00000120  ad 0b ba ab 00 00 00 00 00 00 04 00 00 01 00 00   ................
       00000130  ef be ad de 00 00 00 00 00 00 00 00 00 00 00 00   ................
       00000140  00 00 10 04 0f 00 00 00 00 00 00 00 00 00 00 00   ................
       00000150  00 20 04 00 02 01 00 0f 00 00 00 00 00 00 ef be   . ..............
       00000160  ad de 00 00 00 ad 0b ba 00 00 00 00 00 20 04 00   ............. ..
       00000170  04 01 00 7f 00 54 00 00 00 00 ef be ad de 00 00   .....T..........
       00000180  00 ad 0b ba ab 00 00 00 00 20 04 00 08 01 00 ff   ......... ......
       00000190  0f 46 d6 80 00 00 ef be ad de 00 00 00 ad 0b ba   .F..............
       000001a0  ab 00 00 00 00 20 04 00 10 01 00 ff 03 da 78 00   ..... ........x.
       000001b0  00 00 00 be ad de 00 00 00 ad 0b ba ab 00 00 00   ................
       000001c0  00 00 04 00 02 01 00 0f 00 91 00 00 00 00 00 ef   ................
       000001d0  be de 00 00 00 ad 0b ba ab 00 00 00 00 00 20 04   .............. .
       000001e0  04 01 00 7f 00 54 00 00 00 00 00 ef be ad de 00   .....T..........
       000001f0  00 ad 0b ba ab 00 00 00 00 00 20 04 00 08 00 ff   .......... .....
       00000200  0f 46 d6 80 00 00 00 ef be ad de 00 00 ad 0b ba   .F..............
       00000210  ab 00 00 00 00 00 20 04 00 10 01 00 03 da 78 00   ...... .......x.
       00000220  00 00 00 ef be ad de 00 00 00 ad ba ab 00 00 00   ................
       00000230  00 de ad be 05 00 00 00 01 00 00 28 02 00 00 00   ...........(....
       00000240  00 00 00 00 80 00 00 00 00 05 0f 00 00 00 00 00   ................
       00000250  00 00 00 00 00 00 00 20 00 02 01 00 0f 00 00 00   ....... ........
       00000260  00 00 00 ef be ad de 00 00 8f 71 96 1c 12 fe 95   ..........q.....
       00000270  80 a0 10 36 04 6e 43 3d 1d 1c 31 09 2d 13 bd 5e   ...6.nC=..1.-..^
       00000280  dc e2 45 e9 1f 37 ec 09 ab 4c 35 41 93 e8 04 a7   ..E..7...L5A....
       00000290  cd 05 50 c1 c7 03 55 a1 78 f3 95 c5 98 85 84 1f   ..P...U.x.......
       000002a0  a1 b7 b9 cd e6 9b 0b 89 0d f5 61 8f 71 96 8a 1c   ..........a.q...
       000002b0  12 fe a0 10 36 04 6e fe 43 3d 1d 1c e9 31 09 2d   ....6.n.C=...1.-
       000002c0  13 dc e2 45 e9 1f e7 37 ec 09 00 ab 4c 35 41 e8   ...E...7....L5A.
       000002d0  a7 cd 05 50 c1 f8 c7 03 73 55 a1 78 f3 c5 98 84   ...P....sU.x....
       000002e0  1f a1 b7 b9 58 cd c4 e6 9b 0b 89 f5 61 8f 96 8a   ....X.......a...
       000002f0  1c 12 fe 95 80 a0 10 36 04 fe 43 3d 1d e9 31 09   .......6..C=..1.
       00000300  2d 13 bd 5e dc e2 45 1f e7 37 ec 09 ab 4c 35 41   -..^..E..7...L5A
       00000310  93 e8 04 a7 cd 50 c1 f8 c7 03 73 a1 78 f3 95 c5   .....P....s.x...
       00000320  98 85 84 a1 b7 b9 58 cd c4 e6 0b 89 0d f5 61 05   ......X.......a.
       00000330  00 00 01 00 00 00 48 00 00 00 00 00 00 00 00 00   ......H.........
       00000340  00 00 00 10 05 0f 00 00 00 00 00 00 00 00 00 00   ................
       00000350  00 20 04 00 02 01 00 00 91 00 00 00 00 ef be ad   . ..............
       00000360  de 00 00 00 8f 71 8a 1c 12 95 80 a0 10 36 04 6e   .....q.......6.n
       00000370  fe 43 3d 1d 1c 31 09 13 bd 5e dc e2 45 e9 1f e7   .C=..1...^..E...
       00000380  37 ec 09 00 4c 41 93 e8 04 a7 cd 05 50 c1 f8 c7   7...LA......P...
       00000390  03 73 55 f3 95 c5 98 85 84 1f a1 b7 b9 58 cd c4   .sU..........X..
       000003a0  e6 9b 0d f5 61 8f 71 96 8a 1c 12 fe 95 80 a0 10   ....a.q.........
       000003b0  04 fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e dc 45 e9   ..C=...1.-..^.E.
       000003c0  e7 37 ec 09 00 ab 4c 35 41 93 e8 04 cd 05 50 f8   .7....L5A.....P.
       000003d0  c7 03 73 55 a1 78 f3 95 c5 98 84 1f a1 b7 58 cd   ..sU.x........X.
       000003e0  c4 e6 9b 0b 89 0d f5 61 71 96 8a 1c 12 95 80 a0   .......aq.......
       000003f0  10 36 04 6e fe 43 1d 1c e9 31 09 2d bd 5e dc e2   .6.n.C...1.-.^..
       00000400  45 e9 1f e7 ec 09 00 ab 4c 35 41 e8 04 a7 cd 05   E.......L5A.....
       00000410  50 c1 c7 03 73 55 a1 78 f3 95 98 85 84 1f a1 b7   P...sU.x........
       00000420  58 cd c4 e6 9b 0b 89 0d f5 05 00 00 00 01 00 00   X...............
       00000430  48 00 00 00 00 00 00 00 00 80 00 00 00 10 05 0f   H...............
       00000440  00 00 00 00 00 00 00 00 00 00 00 20 04 00 02 01   ........... ....
       00000450  00 0f 00 91 00 00 00 00 be ad de 00 00 00 8f 71   ...............q
       00000460  96 8a 1c 12 fe 80 10 36 04 6e fe 43 3d 1d 1c e9   .......6.n.C=...
       00000470  31 09 2d 13 dc e2 45 e9 1f e7 37 ec 09 00 ab 4c   1.-...E...7....L
       00000480  35 41 93 a7 cd 05 50 c1 f8 c7 03 73 55 a1 78 f3   5A....P....sU.x.
       00000490  95 98 84 1f a1 b7 b9 58 cd c4 e6 9b 0b 89 0d 61   .......X.......a
       000004a0  8f 96 8a 1c 12 fe 95 80 a0 10 36 04 6e 43 3d 1d   ..........6.nC=.
       000004b0  e9 31 09 2d 13 bd 5e dc e2 45 e9 e7 37 ec 09 ab   .1.-..^..E..7...
       000004c0  4c 35 41 93 e8 04 a7 cd 05 c1 f8 c7 03 73 a1 78   L5A..........s.x
       000004d0  f3 95 c5 98 85 84 1f b7 b9 58 cd c4 e6 0b 89 0d   .........X......
       000004e0  f5 61 8f 71 96 1c 12 fe 95 80 a0 10 04 6e fe 43   .a.q.........n.C
       000004f0  3d 1d 1c 31 09 2d 13 bd 5e dc e2 e9 1f e7 37 ec   =..1.-..^.....7.
       00000500  09 ab 4c 35 41 93 e8 04 a7 cd 50 c1 f8 c7 03 55   ..L5A.....P....U
       00000510  a1 78 f3 95 c5 98 85 84 1f b7 b9 58 cd e6 9b 0b   .x.........X....
       00000520  89 0d f5 61 05 00 00 00 00 00 00 00 00 00 00 00   ...a............
       00000530  00 00 00 00 80 00 00 00 10 0f 00 00 00 00 00 00   ................
       00000540  00 00 00 00 00 00 20 00 02 01 00 0f 00 91 00 00   ...... .........
       00000550  00 00 00 ef be 00 00 00 8f 71 96 8a 1c 12 fe 95   .........q......
       00000560  80 a0 10 36 fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e   ...6.C=...1.-..^
       00000570  dc e2 e9 e7 37 ec 09 00 ab 4c 35 41 93 e8 04 a7   ....7....L5A....
       00000580  05 50 f8 c7 03 73 55 a1 78 f3 95 c5 98 85 1f a1   .P...sU.x.......
       00000590  b7 58 cd c4 e6 9b 0b 89 0d f5 61 8f 96 8a 1c 12   .X........a.....
       000005a0  95 80 a0 10 36 04 6e fe 43 3d 1c e9 31 09 2d bd   ....6.n.C=..1.-.
       000005b0  5e dc e2 45 e9 1f e7 37 09 00 ab 4c 35 41 0b 89   ^..E...7...L5A..
       000005c0  0d f5 61 8f 71 96 1c 12 fe 95 80 a0 10 04 6e fe   ..a.q.........n.
       000005d0  43 3d 1d 1c 31 09 2d 13 bd 5e dc e2 e9 1f e7 37   C=..1.-..^.....7
       000005e0  ec 09 ab 4c 35 41 93 e8 04 a7 cd 50 c1 f8 c7 03   ...L5A.....P....
       000005f0  55 a1 78 f3 95 c5 98 85 84 1f b7 b9 58 cd e6 9b   U.x.........X...
       00000600  0b 89 0d f5 61 05 00 00 00 00 00 00 00 00 00 00   ....a...........
       00000610  00 00 00 00 00 80 00 00 00 10 0f 00 00 00 00 00   ................
       00000620  00 00 00 00 00 00 00 20 00 02 01 00 0f 00 91 00   ....... ........
       00000630  00 00 00 00 ef be 00 00 00 8f 71 96 8a 1c 12 fe   ..........q.....
       00000640  95 80 a0 10 36 fe 43 3d 1d 1c e9 31 09 2d 13 bd   ....6.C=...1.-..
       00000650  5e dc e2 e9 e7 37 ec 09 00 ab 4c 35 41 93 e8 04   ^....7....L5A...
       00000660  a7 05 50 f8 c7 03 73 55 a1 78 f3 95 c5 98 85 1f   ..P...sU.x......
       00000670  a1 b7 58 cd c4 e6 9b 0b 89 0d f5 61 8f 96 8a 1c   ..X........a....
       00000680  12 95 80 a0 10 36 04 6e fe 43 3d 1c e9 31 09 2d   .....6.n.C=..1.-
       00000690  bd 5e dc e2 45 e9 1f e7 37 09 00 ab 4c 35 41 e8   .^..E...7...L5A.
       000006a0  04 a7 cd 05 50 c1 f8 03 73 55 a1 78 f3 95 98 85   ....P...sU.x....
       000006b0  84 1f a1 b7 b9 cd c4 e6 9b 0b 89 0d f5 8f 71 96   ..............q.
       000006c0  8a 1c 12 95 80 a0 10 36 04 6e fe 43 1d 1c e9 31   .......6.n.C...1
       000006d0  09 13 bd 5e dc e2 45 e9 1f e7 37 09 00 ab 4c 41   ...^..E...7...LA
       000006e0  93 e8 04 a7 cd 05 50 c1 f8 c7 73 55 a1 f3 95 c5   ......P...sU....
       000006f0  98 85 84 1f a1 b7 b9 58 cd e6 9b 89 0d f5 98 85   .......X........
       00000700  84 1f a1 b7 b9 58 cd c4 9b 0b 89 0d 61 8f 71 96   .....X......a.q.
       00000710  8a 1c 12 fe 95 80 a0 36 04 6e 43 3d 1d 1c e9 31   .......6.nC=...1
       00000720  09 2d 13 bd 5e dc 45 e9 e7 37 ec 09 00 ab 4c 35   .-..^.E..7....L5
       00000730  41 93 e8 04 a7 05 c1 f8 c7 03 73 55 a1 78 f3 95   A.........sU.x..
       00000740  c5 98 85 84 b7 b9 58 cd c4 e6 9b 0b 89 0d f5 61   ......X........a
       00000750  8f 71 96 12 fe 95 80 a0 10 36 04 6e fe 43 3d 1d   .q.......6.n.C=.
       00000760  1c 31 2d 13 bd 5e dc e2 45 e9 1f e7 37 ec 09 ab   .1-..^..E...7...
       00000770  4c 41 93 e8 04 a7 cd 05 50 c1 f8 c7 03 55 a1 78   LA......P....U.x
       00000780  95 c5 98 85 84 1f a1 b7 b9 58 cd 98 85 84 1f b7   .........X......
       00000790  b9 58 cd c4 e6 9b 0b 89 0d 61 8f 71 96 8a 12 fe   .X.......a.q....
       000007a0  95 80 a0 10 36 04 6e 43 3d 1d 1c e9 31 2d 13 bd   ....6.nC=...1-..
       000007b0  5e dc e2 45 e9 e7 37 ec 09 00 ab 4c 41 93 e8 04   ^..E..7....LA...
       000007c0  a7 cd 05 c1 f8 c7 03 73 55 a1 78 95 c5 98 85 84   .......sU.x.....
       000007d0  1f b7 b9 58 cd c4 e6 9b 0b 89 f5 61 8f 71 96 1c   ...X.......a.q..
       000007e0  12 fe 95 80 a0 10 36 04 6e 43 3d 1d 1c 31 09 2d   ......6.nC=..1.-
       000007f0  13 bd 5e dc e2 45 e9 1f 37 ec 09 ab 4c 35 41 93   ..^..E..7...L5A.
       00000800  e8 04 a7 cd 05 50 c1 c7 03 55 a1 78 f3 95 c5 98   .....P...U.x....
       00000810  85 84 1f a1 b7 b9 cd 50 c1 f8 c7 03 73 55 a1 78   .......P....sU.x
       00000820  f3 95 c5 98 85 a1 b7 b9 58 cd c4 e6 9b 0b 89 0d   ........X.......
       00000830  f5 61 05 00 01 00 00 00 48 00 00 00 00 00 00 00   .a......H.......
       00000840  00 00 00 00 00 10 05 0f 00 00 00 00 00 00 00 00   ................
       00000850  00 00 00 20 04 00 02 01 00 0f 00 91 00 00 00 00   ... ............
       00000860  ef ad de 00 00 00 8f 71 96 8a 1c 12 95 80 a0 10   .......q........
       00000870  04 6e fe 43 3d 1d 1c e9 31 09 13 bd 5e dc e2 e9   .n.C=...1...^...
       00000880  1f e7 37 ec 09 00 ab 4c 41 93 e8 04 a7 cd 50 c1   ..7....LA.....P.
       00000890  f8 c7 03 73 55 a1 f3 95 c5 98 85 84 1f b7 b9 58   ...sU..........X
       000008a0  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
       000008b0  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
       000008c0  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
       000008d0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
       000008e0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
       000008f0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
       00000900  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
       00000910  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
       00000920  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
       00000930  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
       00000940  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
       00000950  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
       00000960  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
       00000970  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
       00000980  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 b7 b9 58   .L5A.....P.....X
       00000990  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
       000009a0  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
       000009b0  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
       000009c0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
       000009d0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
       000009e0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
       000009f0  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
       00000a00  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
       00000a10  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
       00000a20  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
       00000a30  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
       00000a40  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
       00000a50  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
       00000a60  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
       00000a70  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 b7 b9 58   .L5A.....P.....X
       00000a80  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
       00000a90  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
       00000aa0  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
       00000ab0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
       00000ac0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
       00000ad0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
       00000ae0  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
       00000af0  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
       00000b00  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
       00000b10  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
       00000b20  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
       00000b30  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
       00000b40  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
       00000b50  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
       00000b60  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 b7 b9 58   .L5A.....P.....X
       00000b70  cd c4 e6 9b 89 0d f5 61 8f 71 96 8a 12 fe 95 80   .......a.q......
       00000b80  a0 10 04 6e fe 43 3d 1d 1c e9 31 2d 13 bd 5e dc   ...n.C=...1-..^.
       00000b90  45 e9 1f e7 37 ec 09 00 ab 4c 41 93 e8 04 cd 05   E...7....LA.....
       00000ba0  50 c1 f8 c7 03 73 55 a1 78 95 c5 98 84 1f a1 b7   P....sU.x.......
       00000bb0  b9 58 cd c4 e6 9b 0b 89 f5 61 71 96 8a 1c 12 fe   .X.......aq.....
       00000bc0  95 80 a0 10 36 04 6e 43 1d 1c e9 31 09 2d 13 bd   ....6.nC...1.-..
       00000bd0  5e dc e2 45 e9 1f ec 09 00 ab 4c 35 41 93 e8 04   ^..E......L5A...
       00000be0  a7 cd 05 50 c1 03 73 55 a1 78 f3 95 c5 98 85 84   ...P..sU.x......
       00000bf0  1f a1 b7 58 c4 e6 9b 0b 89 0d f5 61 05 00 00 00   ...X.......a....
       00000c00  01 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00   ................
       00000c10  10 05 00 00 00 00 00 00 00 00 00 00 00 00 20 04   .............. .
       00000c20  00 01 00 0f 00 91 00 00 00 00 00 be ad de 00 00   ................
       00000c30  8f 71 96 8a 1c 12 fe 95 80 10 36 04 6e fe 43 1d   .q........6.n.C.
       00000c40  1c e9 31 09 2d 13 bd dc e2 45 e9 1f e7 37 09 00   ..1.-....E...7..
       00000c50  ab 4c 35 41 93 04 a7 cd 05 50 c1 f8 c7 96 8a 1c   .L5A.....P......
       00000c60  12 fe 95 80 a0 10 36 04 fe 43 3d 1d e9 31 09 2d   ......6..C=..1.-
       00000c70  13 bd 5e dc e2 45 1f e7 37 ec 09 ab 4c 35 41 93   ..^..E..7...L5A.
       00000c80  e8 04 a7 cd 50 c1 f8 c7 03 73 a1 78 f3 95 c5 98   ....P....s.x....
       00000c90  85 84 a1 b7 b9 58 cd c4 e6 0b 89 0d f5 61 05 00   .....X.......a..
       00000ca0  00 01 00 00 00 48 00 00 00 00 00 00 00 00 00 00   .....H..........
       00000cb0  00 00 10 05 0f 00 00 00 00 00 00 00 00 00 00 00   ................
       00000cc0  20 04 00 02 01 00 00 91 00 00 00 00 ef be ad de    ...............
       00000cd0  00 00 00 8f 71 8a 1c 12 95 80 a0 10 36 04 6e fe   ....q.......6.n.
       00000ce0  43 3d 1d 1c 31 09 13 bd 5e dc e2 45 e9 1f e7 37   C=..1...^..E...7
       00000cf0  ec 09 00 4c 41 93 e8 04 a7 cd 05 50 c1 f8 c7 03   ...LA......P....
       00000d00  73 55 f3 95 c5 98 85 84 1f a1 b7 b9 58 cd c4 e6   sU..........X...
       00000d10  9b 0d f5 61 8f 71 96 8a 1c 12 fe 95 80 a0 10 04   ...a.q..........
       00000d20  fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e dc 45 e9 e7   .C=...1.-..^.E..
       00000d30  37 ec 09 00 ab 4c 35 41 93 e8 04 cd 05 50 f8 c7   7....L5A.....P..
       00000d40  03 73 55 a1 78 f3 95 c5 98 84 1f a1 b7 58 cd c4   .sU.x........X..
       00000d50  e6 9b 0b 89 0d f5 61 71 96 8a 1c 12 95 80 a0 10   ......aq........
       00000d60  36 04 6e fe 43 1d 1c e9 31 09 2d bd 5e dc e2 45   6.n.C...1.-.^..E
       00000d70  e9 1f e7 ec 09 00 ab 4c 35 41 e8 04 a7 cd 05 50   .......L5A.....P
       00000d80  c1 c7 03 73 55 a1 78 f3 95 98 85 84 1f a1 b7 58   ...sU.x........X
       00000d90  cd c4 e6 9b 0b 89 0d f5 05 00 00 00 01 00 00 48   ...............H
       00000da0  00 00 00 00 00 00 00 00 80 00 00 00 10 05 0f 00   ................
       00000db0  00 00 00 00 00 00 00 00 00 00 20 04 00 02 01 00   .......... .....
       00000dc0  0f 00 91 00 00 00 00 be ad de 00 00 00 8f 71 96   ..............q.
       00000dd0  8a 1c 12 fe 80 10 36 04 6e fe 43 3d 1d 1c e9 31   ......6.n.C=...1
       00000de0  09 2d 13 dc e2 45 e9 1f e7 37 ec 09 00 ab 4c 35   .-...E...7....L5
       00000df0  41 93 a7 cd 05 50 c1 f8 c7 03 73 55 a1 78 f3 95   A....P....sU.x..
       00000e00  98 84 1f a1 b7 b9 58 cd c4 e6 9b 0b 89 0d 61 8f   ......X.......a.
       00000e10  96 8a 1c 12 fe 95 80 a0 10 36 04 6e 43 3d 1d e9   .........6.nC=..
       00000e20  31 09 2d 13 bd 5e dc e2 45 e9 e7 37 ec 09 ab 4c   1.-..^..E..7...L
       00000e30  35 41 93 e8 04 a7 cd 05 c1 f8 c7 03 73 a1 78 f3   5A..........s.x.
       00000e40  95 c5 98 85 84 1f b7 b9 58 cd c4 e6 0b 89 0d f5   ........X.......
       00000e50  61 8f 71 96 1c 12 fe 95 80 a0 10 04 6e fe 43 3d   a.q.........n.C=
       00000e60  1d 1c 31 09 2d 13 bd 5e dc e2 e9 1f e7 37 ec 09   ..1.-..^.....7..
       00000e70  ab 4c 35 41 93 e8 04 a7 cd 50 c1 f8 c7 03 55 a1   .L5A.....P....U.
       00000e80  78 f3 95 c5 98 85 84 1f b7 b9 58 cd e6 9b 0b 89   x.........X.....
       00000e90  0d f5 61 05 00 00 00 00 00 00 00 00 00 00 00 00   ..a.............
       00000ea0  00 00 00 80 00 00 00 10 0f 00 00 00 00 00 00 00   ................
       00000eb0  00 00 00 00 00 20 00 02 01 00 0f 00 91 00 00 00   ..... ..........
       00000ec0  00 00 ef be 00 00 00 8f 71 96 8a 1c 12 fe 95 80   ........q.......
       00000ed0  a0 10 36 fe 43 3d 1d 1c e9 31 09 2d 13 bd 5e dc   ..6.C=...1.-..^.
       00000ee0  e2 e9 e7 37 ec 09 00 ab 4c 35 41 93 e8 04 a7 05   ...7....L5A.....
       00000ef0  50 f8 c7 03 73 55 a1 78 f3 95 c5 98 85 1f a1 b7   P...sU.x........

And checked that Linux Kernel indeed received a big CPER:

Hardware error from APEI Generic Hardware Error Source: 1 event severity: recoverable
Error 0, type: recoverable

    section_type: ARM processor error
    MIDR: 0x00000000000f0510
    Multiprocessor Affinity Register (MPIDR): 0x0000000080000000
    running state: 0x0
    Power State Coordination Interface state: 0
    Error info structure 0:
    num errors: 2
     error_type: 0x02: cache error
     error_info: 0x000000000091000f
      transaction type: Data Access
      cache error, operation type: Data write
      cache level: 2
      processor context not corrupted
    Error info structure 1:
    num errors: 2
     error_type: 0x04: TLB error
     error_info: 0x000000000054007f
      transaction type: Instruction
      TLB error, operation type: Instruction fetch
      TLB level: 1
      processor context not corrupted
      the error has not been corrected
      PC is imprecise
    Error info structure 2:
    num errors: 2
     error_type: 0x08: bus error
     error_info: 0x00000080d6460fff
      transaction type: Generic
      bus error, operation type: Generic read (type of instruction or data request cannot be determined)
      affinity level at which the bus error occurred: 1
      processor context corrupted
      the error has been corrected
      PC is imprecise
      Program execution can be restarted reliably at the PC associated with the error.
      participation type: Local processor observed
      request timed out
      address space: External Memory Access
      memory access attributes:0x20
      access mode: secure
    Error info structure 3:
    num errors: 2
     error_type: 0x10: micro-architectural error
     error_info: 0x0000000078da03ff
    Error info structure 4:
    num errors: 2
     error_type: 0x02: cache error
     error_info: 0x000000000091000f
      transaction type: Data Access
      cache error, operation type: Data write
      cache level: 2
      processor context not corrupted
    Error info structure 5:
    num errors: 2
     error_type: 0x04: TLB error
     error_info: 0x000000000054007f
      transaction type: Instruction
      TLB error, operation type: Instruction fetch
      TLB level: 1
      processor context not corrupted
      the error has not been corrected
      PC is imprecise
    Error info structure 6:
    num errors: 2
     error_type: 0x08: bus error
     error_info: 0x00000080d6460fff
      transaction type: Generic
      bus error, operation type: Generic read (type of instruction or data request cannot be determined)
      affinity level at which the bus error occurred: 1
      processor context corrupted
      the error has been corrected
      PC is imprecise
      Program execution can be restarted reliably at the PC associated with the error.
      participation type: Local processor observed
      request timed out
      address space: External Memory Access
      memory access attributes:0x20
      access mode: secure
    Error info structure 7:
    num errors: 2
     error_type: 0x10: micro-architectural error
     error_info: 0x0000000078da04ff
    Context info structure 0:
     register context type: AArch64 general purpose registers
     00000000: deadbeef 00000000 00000000 00000000
     00000010: 04100000 0000000f 00000000 00000000
     00000020: 00042000 0f000102 00000000 beef0000
     00000030: 0000dead ba0bad00 00000000 00042000
     00000040: 7f000104 00005400 beef0000 0000dead
     00000050: ba0bad00 000000ab 00042000 ff000108
     00000060: 80d6460f beef0000 0000dead ba0bad00
     00000070: 000000ab 00042000 ff000110 0078da03
     00000080: be000000 0000dead ba0bad00 000000ab
     00000090: 00040000 0f000102 00009100 ef000000
     000000a0: 0000debe ba0bad00 000000ab 04200000
     000000b0: 7f000104 00005400 ef000000 00deadbe
     000000c0: ba0bad00 000000ab 04200000 ff000800
     000000d0: 80d6460f ef000000 00deadbe ba0bad00
     000000e0: 000000ab 04200000 00011000 0078da03
     000000f0: ef000000 00deadbe baad0000 000000ab
    Vendor specific error info has 3280 bytes:
     00000000: beadde00 00000005 28000001 00000002  ...........(....
     00000010: 00000000 00000080 000f0500 00000000  ................
     00000020: 00000000 20000000 00010200 0000000f  ....... ........
     00000030: ef000000 00deadbe 96718f00 95fe121c  ..........q.....
     00000040: 3610a080 3d436e04 09311c1d 5ebd132d  ...6.nC=..1.-..^
     00000050: e945e2dc 09ec371f 41354cab a704e893  ..E..7...L5A....
     00000060: c15005cd a15503c7 c595f378 1f848598  ..P...U.x.......
     00000070: cdb9b7a1 890b9be6 8f61f50d 1c8a9671  ..........a.q...
     00000080: 10a0fe12 fe6e0436 1c1d3d43 2d0931e9  ....6.n.C=...1.-
     00000090: 45e2dc13 37e71fe9 ab0009ec e841354c  ...E...7....L5A.
     000000a0: 5005cda7 03c7f8c1 78a15573 8498c5f3  ...P....sU.x....
     000000b0: b9b7a11f e6c4cd58 f5890b9b 8a968f61  ....X.......a...
     000000c0: 95fe121c 3610a080 3d43fe04 0931e91d  .......6..C=..1.
     000000d0: 5ebd132d 1f45e2dc 09ec37e7 41354cab  -..^..E..7...L5A
     000000e0: a704e893 f8c150cd a17303c7 c595f378  .....P....s.x...
     000000f0: a1848598 cd58b9b7 890be6c4 0561f50d  ......X.......a.
     00000100: 00010000 00480000 00000000 00000000  ......H.........
     00000110: 10000000 00000f05 00000000 00000000  ................
     00000120: 00042000 00000102 00000091 adbeef00  . ..............
     00000130: 000000de 1c8a718f a0809512 6e043610  .....q.......6.n
     00000140: 1d3d43fe 1309311c e2dc5ebd e71fe945  .C=..1...^..E...
     00000150: 0009ec37 e893414c 05cda704 c7f8c150  7...LA......P...
     00000160: f3557303 8598c595 b7a11f84 c4cd58b9  .sU..........X..
     00000170: f50d9be6 96718f61 fe121c8a 10a08095  ....a.q.........
     00000180: 3d43fe04 31e91c1d bd132d09 e945dc5e  ..C=...1.-..^.E.
     00000190: 09ec37e7 354cab00 04e89341 f85005cd  .7....L5A.....P.
     000001a0: 557303c7 95f378a1 1f8498c5 cd58b7a1  ..sU.x........X.
     000001b0: 0b9be6c4 61f50d89 1c8a9671 a0809512  .......aq.......
     000001c0: 6e043610 1c1d43fe 2d0931e9 e2dc5ebd  .6.n.C...1.-.^..
     000001d0: e71fe945 ab0009ec e841354c 05cda704  E.......L5A.....
     000001e0: 03c7c150 78a15573 859895f3 b7a11f84  P...sU.x........
     000001f0: e6c4cd58 0d890b9b 000005f5 00000100  X...............
     00000200: 00000048 00000000 00008000 0f051000  H...............
     00000210: 00000000 00000000 20000000 01020004  ........... ....
     00000220: 91000f00 00000000 00deadbe 718f0000  ...............q
     00000230: 121c8a96 361080fe 43fe6e04 e91c1d3d  .......6.n.C=...
     00000240: 132d0931 e945e2dc ec37e71f 4cab0009  1.-...E...7....L
     00000250: a7934135 c15005cd 7303c7f8 f378a155  5A....P....sU.x.
     00000260: 1f849895 58b9b7a1 9be6c4cd 610d890b  .......X.......a
     00000270: 1c8a968f 8095fe12 043610a0 1d3d436e  ..........6.nC=.
     00000280: 2d0931e9 dc5ebd13 e7e945e2 ab09ec37  .1.-..^..E..7...
     00000290: 9341354c cda704e8 c7f8c105 78a17303  L5A..........s.x
     000002a0: 98c595f3 b71f8485 c4cd58b9 0d890be6  .........X......
     000002b0: 718f61f5 fe121c96 10a08095 43fe6e04  .a.q.........n.C
     000002c0: 311c1d3d bd132d09 e9e2dc5e ec37e71f  =..1.-..^.....7.
     000002d0: 354cab09 04e89341 c150cda7 5503c7f8  ..L5A.....P....U
     000002e0: 95f378a1 848598c5 58b9b71f 0b9be6cd  .x.........X....
     000002f0: 61f50d89 00000005 00000000 00000000  ...a............
     00000300: 00000000 00000080 00000f10 00000000  ................
     00000310: 00000000 00200000 0f000102 00009100  ...... .........
     00000320: ef000000 000000be 8a96718f 95fe121c  .........q......
     00000330: 3610a080 1d3d43fe 0931e91c 5ebd132d  ...6.C=...1.-..^
     00000340: e7e9e2dc 0009ec37 41354cab a704e893  ....7....L5A....
     00000350: c7f85005 a1557303 c595f378 a11f8598  .P...sU.x.......
     00000360: c4cd58b7 890b9be6 8f61f50d 121c8a96  .X........a.....
     00000370: 10a08095 fe6e0436 e91c3d43 bd2d0931  ....6.n.C=..1.-.
     00000380: 45e2dc5e 37e71fe9 4cab0009 890b4135  ^..E...7...L5A..
     00000390: 8f61f50d 121c9671 a08095fe fe6e0410  ..a.q.........n.
     000003a0: 1c1d3d43 132d0931 e2dc5ebd 37e71fe9  C=..1.-..^.....7
     000003b0: 4cab09ec e8934135 50cda704 03c7f8c1  ...L5A.....P....
     000003c0: f378a155 8598c595 b9b71f84 9be6cd58  U.x.........X...
     000003d0: f50d890b 00000561 00000000 00000000  ....a...........
     000003e0: 00000000 00008000 000f1000 00000000  ................
     000003f0: 00000000 20000000 00010200 0091000f  ....... ........
     00000400: 00000000 0000beef 96718f00 fe121c8a  ..........q.....
     00000410: 10a08095 3d43fe36 31e91c1d bd132d09  ....6.C=...1.-..
     00000420: e9e2dc5e 09ec37e7 354cab00 04e89341  ^....7....L5A...
     00000430: f85005a7 557303c7 95f378a1 1f8598c5  ..P...sU.x......
     00000440: cd58b7a1 0b9be6c4 61f50d89 1c8a968f  ..X........a....
     00000450: a0809512 6e043610 1c3d43fe 2d0931e9  .....6.n.C=..1.-
     00000460: e2dc5ebd e71fe945 ab000937 e841354c  .^..E...7...L5A.
     00000470: 05cda704 03f8c150 78a15573 859895f3  ....P...sU.x....
     00000480: b7a11f84 e6c4cdb9 0d890b9b 96718ff5  ..............q.
     00000490: 95121c8a 3610a080 43fe6e04 31e91c1d  .......6.n.C...1
     000004a0: 5ebd1309 e945e2dc 0937e71f 414cab00  ...^..E...7...LA
     000004b0: a704e893 c15005cd 5573c7f8 c595f3a1  ......P...sU....
     000004c0: 1f848598 58b9b7a1 899be6cd 8598f50d  .......X........
     000004d0: b7a11f84 c4cd58b9 0d890b9b 96718f61  .....X......a.q.
     000004e0: fe121c8a 36a08095 3d436e04 31e91c1d  .......6.nC=...1
     000004f0: bd132d09 e945dc5e 09ec37e7 354cab00  .-..^.E..7....L5
     00000500: 04e89341 f8c105a7 557303c7 95f378a1  A.........sU.x..
     00000510: 848598c5 cd58b9b7 0b9be6c4 61f50d89  ......X........a
     00000520: 1296718f a08095fe 6e043610 1d3d43fe  .q.......6.n.C=.
     00000530: 132d311c e2dc5ebd e71fe945 ab09ec37  .1-..^..E...7...
     00000540: e893414c 05cda704 c7f8c150 78a15503  LA......P....U.x
     00000550: 8598c595 b7a11f84 98cd58b9 b71f8485  .........X......
     00000560: c4cd58b9 890b9be6 718f610d fe128a96  .X.......a.q....
     00000570: 10a08095 436e0436 e91c1d3d bd132d31  ....6.nC=...1-..
     00000580: 45e2dc5e ec37e7e9 4cab0009 04e89341  ^..E..7....LA...
     00000590: c105cda7 7303c7f8 9578a155 848598c5  .......sU.x.....
     000005a0: 58b9b71f 9be6c4cd 61f5890b 1c96718f  ...X.......a.q..
     000005b0: 8095fe12 043610a0 1d3d436e 2d09311c  ......6.nC=..1.-
     000005c0: dc5ebd13 1fe945e2 ab09ec37 9341354c  ..^..E..7...L5A.
     000005d0: cda704e8 c7c15005 78a15503 98c595f3  .....P...U.x....
     000005e0: a11f8485 50cdb9b7 03c7f8c1 78a15573  .......P....sU.x
     000005f0: 98c595f3 b9b7a185 e6c4cd58 0d890b9b  ........X.......
     00000600: 000561f5 00000001 00000048 00000000  .a......H.......
     00000610: 00000000 0f051000 00000000 00000000  ................
     00000620: 20000000 01020004 91000f00 00000000  ... ............
     00000630: 00deadef 718f0000 121c8a96 10a08095  .......q........
     00000640: 43fe6e04 e91c1d3d bd130931 e9e2dc5e  .n.C=...1...^...
     00000650: ec37e71f 4cab0009 04e89341 c150cda7  ..7....LA.....P.
     00000660: 7303c7f8 95f3a155 848598c5 58b9b71f  ...sU..........X
     00000670: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
     00000680: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
     00000690: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
     000006a0: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
     000006b0: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
     000006c0: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
     000006d0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
     000006e0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
     000006f0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
     00000700: 00000001 00000000 00000000 00000080  ................
     00000710: 00000510 00000000 00000000 04200000  .............. .
     00000720: 0f000100 00009100 be000000 0000dead  ................
     00000730: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
     00000740: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
     00000750: 41354cab cda70493 f8c15005 58b9b7c7  .L5A.....P.....X
     00000760: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
     00000770: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
     00000780: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
     00000790: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
     000007a0: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
     000007b0: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
     000007c0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
     000007d0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
     000007e0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
     000007f0: 00000001 00000000 00000000 00000080  ................
     00000800: 00000510 00000000 00000000 04200000  .............. .
     00000810: 0f000100 00009100 be000000 0000dead  ................
     00000820: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
     00000830: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
     00000840: 41354cab cda70493 f8c15005 58b9b7c7  .L5A.....P.....X
     00000850: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
     00000860: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
     00000870: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
     00000880: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
     00000890: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
     000008a0: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
     000008b0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
     000008c0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
     000008d0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
     000008e0: 00000001 00000000 00000000 00000080  ................
     000008f0: 00000510 00000000 00000000 04200000  .............. .
     00000900: 0f000100 00009100 be000000 0000dead  ................
     00000910: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
     00000920: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
     00000930: 41354cab cda70493 f8c15005 58b9b7c7  .L5A.....P.....X
     00000940: 9be6c4cd 61f50d89 8a96718f 8095fe12  .......a.q......
     00000950: 6e0410a0 1d3d43fe 2d31e91c dc5ebd13  ...n.C=...1-..^.
     00000960: e71fe945 0009ec37 93414cab 05cd04e8  E...7....LA.....
     00000970: c7f8c150 a1557303 98c59578 b7a11f84  P....sU.x.......
     00000980: c4cd58b9 890b9be6 967161f5 fe121c8a  .X.......aq.....
     00000990: 10a08095 436e0436 31e91c1d bd132d09  ....6.nC...1.-..
     000009a0: 45e2dc5e 09ec1fe9 354cab00 04e89341  ^..E......L5A...
     000009b0: 5005cda7 557303c1 95f378a1 848598c5  ...P..sU.x......
     000009c0: 58b7a11f 0b9be6c4 61f50d89 00000005  ...X.......a....
     000009d0: 00000001 00000000 00000000 00000080  ................
     000009e0: 00000510 00000000 00000000 04200000  .............. .
     000009f0: 0f000100 00009100 be000000 0000dead  ................
     00000a00: 8a96718f 95fe121c 04361080 1d43fe6e  .q........6.n.C.
     00000a10: 0931e91c dcbd132d 1fe945e2 000937e7  ..1.-....E...7..
     00000a20: 41354cab cda70493 f8c15005 1c8a96c7  .L5A.....P......
     00000a30: 8095fe12 043610a0 1d3d43fe 2d0931e9  ......6..C=..1.-
     00000a40: dc5ebd13 e71f45e2 ab09ec37 9341354c  ..^..E..7...L5A.
     00000a50: cda704e8 c7f8c150 78a17303 98c595f3  ....P....s.x....
     00000a60: b7a18485 c4cd58b9 0d890be6 000561f5  .....X.......a..
     00000a70: 00000100 00004800 00000000 00000000  .....H..........
     00000a80: 05100000 0000000f 00000000 00000000  ................
     00000a90: 02000420 91000001 00000000 deadbeef   ...............
     00000aa0: 8f000000 121c8a71 10a08095 fe6e0436  ....q.......6.n.
     00000ab0: 1c1d3d43 bd130931 45e2dc5e 37e71fe9  C=..1...^..E...7
     00000ac0: 4c0009ec 04e89341 5005cda7 03c7f8c1  ...LA......P....
     00000ad0: 95f35573 848598c5 b9b7a11f e6c4cd58  sU..........X...
     00000ae0: 61f50d9b 8a96718f 95fe121c 0410a080  ...a.q..........
     00000af0: 1d3d43fe 0931e91c 5ebd132d e7e945dc  .C=...1.-..^.E..
     00000b00: 0009ec37 41354cab cd04e893 c7f85005  7....L5A.....P..
     00000b10: a1557303 c595f378 a11f8498 c4cd58b7  .sU.x........X..
     00000b20: 890b9be6 7161f50d 121c8a96 10a08095  ......aq........
     00000b30: fe6e0436 e91c1d43 bd2d0931 45e2dc5e  6.n.C...1.-.^..E
     00000b40: ece71fe9 4cab0009 04e84135 5005cda7  .......L5A.....P
     00000b50: 7303c7c1 f378a155 84859895 58b7a11f  ...sU.x........X
     00000b60: 9be6c4cd f50d890b 00000005 48000001  ...............H
     00000b70: 00000000 00000000 00000080 000f0510  ................
     00000b80: 00000000 00000000 04200000 00010200  .......... .....
     00000b90: 0091000f be000000 0000dead 96718f00  ..............q.
     00000ba0: fe121c8a 04361080 3d43fe6e 31e91c1d  ......6.n.C=...1
     00000bb0: dc132d09 1fe945e2 09ec37e7 354cab00  .-...E...7....L5
     00000bc0: cda79341 f8c15005 557303c7 95f378a1  A....P....sU.x..
     00000bd0: a11f8498 cd58b9b7 0b9be6c4 8f610d89  ......X.......a.
     00000be0: 121c8a96 a08095fe 6e043610 e91d3d43  .........6.nC=..
     00000bf0: 132d0931 e2dc5ebd 37e7e945 4cab09ec  1.-..^..E..7...L
     00000c00: e8934135 05cda704 03c7f8c1 f378a173  5A..........s.x.
     00000c10: 8598c595 b9b71f84 e6c4cd58 f50d890b  ........X.......
     00000c20: 96718f61 95fe121c 0410a080 3d43fe6e  a.q.........n.C=
     00000c30: 09311c1d 5ebd132d 1fe9e2dc 09ec37e7  ..1.-..^.....7..
     00000c40: 41354cab a704e893 f8c150cd a15503c7  .L5A.....P....U.
     00000c50: c595f378 1f848598 cd58b9b7 890b9be6  x.........X.....
     00000c60: 0561f50d 00000000 00000000 00000000  ..a.............
     00000c70: 80000000 10000000 0000000f 00000000  ................
     00000c80: 00000000 02002000 000f0001 00000091  ..... ..........
     00000c90: beef0000 8f000000 1c8a9671 8095fe12  ........q.......
     00000ca0: fe3610a0 1c1d3d43 2d0931e9 dc5ebd13  ..6.C=...1.-..^.
     00000cb0: 37e7e9e2 ab0009ec 9341354c 05a704e8  ...7....L5A.....
     00000cc0: 03c7f850 78a15573 98c595f3 b7a11f85  P...sU.x........
    GHES: Unhandled processor error type 0x02: cache error
    GHES: Unhandled processor error type 0x04: TLB error
    GHES: Unhandled processor error type 0x08: bus error
    GHES: Unhandled processor error type 0x10: micro-architectural error
    GHES: Unhandled processor error type 0x02: cache error
    GHES: Unhandled processor error type 0x04: TLB error
    GHES: Unhandled processor error type 0x08: bus error
    GHES: Unhandled processor error type 0x10: micro-architectural error
docs/specs/acpi_hest_ghes.rst +1 -1
index aaf7b1ad11a5..acf31d6eeb7c 100644
@@ -68,7 +68,7 @@ Design Details
      and N Read Ack Register entries. The size for each entry is 8-byte.
      The Error Status Data Block table contains N Error Status Data Block
      entries. The size for each entry is defined at the source code as
-    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 1024 bytes). The total size
+    ACPI_GHES_MAX_RAW_DATA_LENGTH (currently 4096 bytes). The total size
      for the "etc/hardware_errors" fw_cfg blob is
      (N * 8 * 2 + N * ACPI_GHES_MAX_RAW_DATA_LENGTH) bytes.
      N is the number of the kinds of hardware error sources.
hw/acpi/ghes.c +1 -1
index d5d5ff7474f4..77631147cf21 100644
@@ -33,7 +33,7 @@
  #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
  /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
  /* Generic Hardware Error Source version 2 */
  #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
#16 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

In reply to Gavin Shan
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Quoted 90 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
 hw/acpi/ghes.c   |  2 +-
 target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
 #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
 /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
 /* Generic Hardware Error Source version 2 */
 #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/units.h"
 #include <sys/ioctl.h>
 
 #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                     uint64_t paddr)
 {
     GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
     int ret;
 
     kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
     ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
     if (ret) {
         goto error;
author
#17 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Hi Igor,

Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

Thanks,
Gavin

Quoted 91 lines
Quoted 90 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
  hw/acpi/ghes.c   |  2 +-
  target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
  2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
  #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
  /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
  /* Generic Hardware Error Source version 2 */
  #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
   */
 
  #include "qemu/osdep.h"
+#include "qemu/units.h"
  #include <sys/ioctl.h>
 
  #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                      uint64_t paddr)
  {
      GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
      int ret;
 
      kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
      ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
      if (ret) {
          goto error;
#18 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Quoted 49 lines · On Sun, 19 Oct 2025 10:36:16 +1000 Gavin Shan <[email protected]> wrote:

Hi Igor,

Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

Quoted 8 lines

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

1) What I'm concerned about is that it target one specific case only. Imagine if 1st cpu get error on page1 and another on page2=(page1+host_page_size) and so on for other CPUs. Then we are back where we were before this series.

Also in abstract future when ARM gets 1Gb pages, that won't scale well.

Can we instead of making up CPERs to cover whole host page, create 1/vcpu GHES source?
That way when vcpu trips over bad page, it would have its own error status block to put errors in.
That would address [1] and deterministically scale
(well assuming that multiple SEA error sources are possible in theory)

PS:
I also wonder what real HW does when it gets in similar situation (i.e. error status block is not yet acknowledged but another async error arrived for the same error source)?

Quoted 97 lines

Thanks,
Gavin

Quoted 91 lines
Quoted 90 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
  hw/acpi/ghes.c   |  2 +-
  target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
  2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
  #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
  /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
  /* Generic Hardware Error Source version 2 */
  #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
   */
 
  #include "qemu/osdep.h"
+#include "qemu/units.h"
  #include <sys/ioctl.h>
 
  #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                      uint64_t paddr)
  {
      GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
      int ret;
 
      kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
      ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
      if (ret) {
          goto error;  
author
#19 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Quoted 62 lines · Igor Mammedov
Quoted 47 lines · On Sun, 19 Oct 2025 10:36:16 +1000 Gavin Shan <[email protected]> wrote:
Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

Quoted 8 lines

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

1) What I'm concerned about is that it target one specific case only. Imagine if 1st cpu get error on page1 and another on page2=(page1+host_page_size) and so on for other CPUs. Then we are back where we were before this series.

Quoted 9 lines

Also in abstract future when ARM gets 1Gb pages, that won't scale well.

Can we instead of making up CPERs to cover whole host page, create 1/vcpu GHES source?
That way when vcpu trips over bad page, it would have its own error status block to put errors in.
That would address [1] and deterministically scale
(well assuming that multiple SEA error sources are possible in theory)

I think it's a good idea to have individual error source for each vCPU. In this way, the read_ack_reg won't be a limitation. I hope Jonathan is ok to this scheme.

Currently, we have two (fixed) error sources like below. I assume the index of the error source per vCPU will starts from (ACPI_HEST_SRC_ID_QMP + 1) based on CPUState::cpu_index.

enum AcpiGhesSourceID {
ACPI_HEST_SRC_ID_SYNC,
ACPI_HEST_SRC_ID_QMP, /* Use it only for QMP injected errors */
};

Quoted 5 lines

PS:
I also wonder what real HW does when it gets in similar situation (i.e. error status block is not yet acknowledged but another async error arrived for the same error source)?

I believe real HW also have this specific issue. As to ARM64, I ever did some google search and was told the error follows the firmware-first policy and handled by a component of trustfirmware-a. However, I was unable to get the source code. So it's hard for me to know how this specific issue is handled there.

Thanks,
Gavin

Quoted 93 lines
Quoted 92 lines
Quoted 91 lines
Quoted 90 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
   hw/acpi/ghes.c   |  2 +-
   target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
   2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
   #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
   /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
   /* Generic Hardware Error Source version 2 */
   #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
    */
 
   #include "qemu/osdep.h"
+#include "qemu/units.h"
   #include <sys/ioctl.h>
 
   #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                       uint64_t paddr)
   {
       GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
       int ret;
 
       kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
       ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
       if (ret) {
           goto error;
#20 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Quoted 73 lines · On Mon, 3 Nov 2025 09:02:54 +1000 Gavin Shan <[email protected]> wrote:
Quoted 62 lines · Igor Mammedov
Quoted 47 lines · On Sun, 19 Oct 2025 10:36:16 +1000 Gavin Shan <[email protected]> wrote:
Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

Quoted 8 lines

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

1) What I'm concerned about is that it target one specific case only. Imagine if 1st cpu get error on page1 and another on page2=(page1+host_page_size) and so on for other CPUs. Then we are back where we were before this series.

Quoted 9 lines

Also in abstract future when ARM gets 1Gb pages, that won't scale well.

Can we instead of making up CPERs to cover whole host page, create 1/vcpu GHES source?
That way when vcpu trips over bad page, it would have its own error status block to put errors in.
That would address [1] and deterministically scale
(well assuming that multiple SEA error sources are possible in theory)

Quoted 6 lines

I think it's a good idea to have individual error source for each vCPU. In this way, the read_ack_reg won't be a limitation. I hope Jonathan is ok to this scheme.

Currently, we have two (fixed) error sources like below. I assume the index of the error source per vCPU will starts from (ACPI_HEST_SRC_ID_QMP + 1) based on CPUState::cpu_index.

I'd suggest ditch cpu index and use arch_id instead.

Quoted 13 lines

enum AcpiGhesSourceID {
ACPI_HEST_SRC_ID_SYNC,
ACPI_HEST_SRC_ID_QMP, /* Use it only for QMP injected errors */
};

Quoted 5 lines

PS:
I also wonder what real HW does when it gets in similar situation (i.e. error status block is not yet acknowledged but another async error arrived for the same error source)?

Quoted 5 lines

I believe real HW also have this specific issue. As to ARM64, I ever did some google search and was told the error follows the firmware-first policy and handled by a component of trustfirmware-a. However, I was unable to get the source code. So it's hard for me to know how this specific issue is handled there.

Perhaps Jonathan can help with finding how real hw works around it?

My idea using per cpu source is just a speculation based on spec on how workaround the problem,
I don't really know if guest OS will be able to handle it (aka, need to be tested is it's viable). That also probably was a reason in previous review, why should've waited for multiple sources support be be merged first before this series.

Quoted 97 lines

Thanks,
Gavin

Quoted 93 lines
Quoted 92 lines
Quoted 91 lines
Quoted 90 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
   hw/acpi/ghes.c   |  2 +-
   target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
   2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
   #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
   /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
   /* Generic Hardware Error Source version 2 */
   #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
    */
 
   #include "qemu/osdep.h"
+#include "qemu/units.h"
   #include <sys/ioctl.h>
 
   #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                       uint64_t paddr)
   {
       GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
       int ret;
 
       kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
       ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
       if (ret) {
           goto error;  
author
#21 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Quoted 76 lines · Igor Mammedov
Quoted 73 lines · On Mon, 3 Nov 2025 09:02:54 +1000 Gavin Shan <[email protected]> wrote:
Quoted 71 lines · Igor Mammedov
Quoted 47 lines · On Sun, 19 Oct 2025 10:36:16 +1000 Gavin Shan <[email protected]> wrote:
Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

Quoted 8 lines

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

1) What I'm concerned about is that it target one specific case only. Imagine if 1st cpu get error on page1 and another on page2=(page1+host_page_size) and so on for other CPUs. Then we are back where we were before this series.

Also in abstract future when ARM gets 1Gb pages, that won't scale well.

Can we instead of making up CPERs to cover whole host page, create 1/vcpu GHES source?
That way when vcpu trips over bad page, it would have its own error status block to put errors in.
That would address [1] and deterministically scale
(well assuming that multiple SEA error sources are possible in theory)

Quoted 9 lines
Quoted 6 lines

I think it's a good idea to have individual error source for each vCPU. In this way, the read_ack_reg won't be a limitation. I hope Jonathan is ok to this scheme.

Currently, we have two (fixed) error sources like below. I assume the index of the error source per vCPU will starts from (ACPI_HEST_SRC_ID_QMP + 1) based on CPUState::cpu_index.

I'd suggest ditch cpu index and use arch_id instead.

arch_id, which is returned from CPUClass::get_arch_id(), is uint64_t. The error source index is uint16_t, as defined in ACPI spec 6.5 (section 18.3.2.7 Generic Hardware Error Source). So I think CPUState::cpu_index is the appropriate error source index.

Quoted 19 lines
Quoted 13 lines

enum AcpiGhesSourceID {
ACPI_HEST_SRC_ID_SYNC,
ACPI_HEST_SRC_ID_QMP, /* Use it only for QMP injected errors */
};

Quoted 5 lines

PS:
I also wonder what real HW does when it gets in similar situation (i.e. error status block is not yet acknowledged but another async error arrived for the same error source)?

Quoted 5 lines

I believe real HW also have this specific issue. As to ARM64, I ever did some google search and was told the error follows the firmware-first policy and handled by a component of trustfirmware-a. However, I was unable to get the source code. So it's hard for me to know how this specific issue is handled there.

Quoted 9 lines

Perhaps Jonathan can help with finding how real hw works around it?

My idea using per cpu source is just a speculation based on spec on how workaround the problem,
I don't really know if guest OS will be able to handle it (aka, need to be tested is it's viable). That also probably was a reason in previous review, why should've waited for multiple sources support be be merged first before this series.

Well, the point is the guest won't be full functional until the the problematic host page is isolated and replaced by another host page. To avoid crash the qemu still gives customer a chance to collect important information from the guest by luck.

Thanks,
Gavin

Quoted 96 lines
Quoted 95 lines
Quoted 94 lines
Quoted 93 lines
Quoted 92 lines
Quoted 91 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
    hw/acpi/ghes.c   |  2 +-
    target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
    2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
    #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
    /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
    /* Generic Hardware Error Source version 2 */
    #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
     */
 
    #include "qemu/osdep.h"
+#include "qemu/units.h"
    #include <sys/ioctl.h>
 
    #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                        uint64_t paddr)
    {
        GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
        int ret;
 
        kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
        ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
        if (ret) {
            goto error;
#22 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Quoted 84 lines · On Tue, 4 Nov 2025 09:51:42 +1000 Gavin Shan <[email protected]> wrote:
Quoted 83 lines · Igor Mammedov
Quoted 79 lines · On Mon, 3 Nov 2025 09:02:54 +1000 Gavin Shan <[email protected]> wrote:
Quoted 62 lines · Igor Mammedov
Quoted 47 lines · On Sun, 19 Oct 2025 10:36:16 +1000 Gavin Shan <[email protected]> wrote:
Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

Quoted 8 lines

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

1) What I'm concerned about is that it target one specific case only. Imagine if 1st cpu get error on page1 and another on page2=(page1+host_page_size) and so on for other CPUs. Then we are back where we were before this series.

Quoted 9 lines

Also in abstract future when ARM gets 1Gb pages, that won't scale well.

Can we instead of making up CPERs to cover whole host page, create 1/vcpu GHES source?
That way when vcpu trips over bad page, it would have its own error status block to put errors in.
That would address [1] and deterministically scale
(well assuming that multiple SEA error sources are possible in theory)

I think it's a good idea to have individual error source for each vCPU. In this way, the read_ack_reg won't be a limitation. I hope Jonathan is ok to this scheme.

Currently, we have two (fixed) error sources like below. I assume the index of the error source per vCPU will starts from (ACPI_HEST_SRC_ID_QMP + 1) based on CPUState::cpu_index.

Quoted 7 lines
Quoted 2 lines

I'd suggest ditch cpu index and use arch_id instead.

arch_id, which is returned from CPUClass::get_arch_id(), is uint64_t. The error source index is uint16_t, as defined in ACPI spec 6.5 (section 18.3.2.7 Generic Hardware Error Source). So I think CPUState::cpu_index is the appropriate error source index.

while for ARM cpu_index might work, it's not stable on targets where CPU hotplug exists. Given it's generic ACPI code, It would be better to take this consideration into account.

(aka make a map of arch_id to src_id if necessary)

Quoted 136 lines
Quoted 20 lines
Quoted 14 lines

enum AcpiGhesSourceID {
ACPI_HEST_SRC_ID_SYNC,
ACPI_HEST_SRC_ID_QMP, /* Use it only for QMP injected errors */
};

Quoted 5 lines

PS:
I also wonder what real HW does when it gets in similar situation (i.e. error status block is not yet acknowledged but another async error arrived for the same error source)?

Quoted 5 lines

I believe real HW also have this specific issue. As to ARM64, I ever did some google search and was told the error follows the firmware-first policy and handled by a component of trustfirmware-a. However, I was unable to get the source code. So it's hard for me to know how this specific issue is handled there.

Quoted 9 lines

Perhaps Jonathan can help with finding how real hw works around it?

My idea using per cpu source is just a speculation based on spec on how workaround the problem,
I don't really know if guest OS will be able to handle it (aka, need to be tested is it's viable). That also probably was a reason in previous review, why should've waited for multiple sources support be be merged first before this series.

Well, the point is the guest won't be full functional until the the problematic host page is isolated and replaced by another host page. To avoid crash the qemu still gives customer a chance to collect important information from the guest by luck.

Thanks,
Gavin

Quoted 96 lines
Quoted 95 lines
Quoted 94 lines
Quoted 93 lines
Quoted 92 lines
Quoted 91 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
    hw/acpi/ghes.c   |  2 +-
    target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
    2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
    #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
    /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
    /* Generic Hardware Error Source version 2 */
    #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
     */
 
    #include "qemu/osdep.h"
+#include "qemu/units.h"
    #include <sys/ioctl.h>
 
    #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                        uint64_t paddr)
    {
        GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
        int ret;
 
        kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
        ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
        if (ret) {
            goto error;  
author
#23 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Hi Igor,

Quoted 95 lines · Igor Mammedov
Quoted 84 lines · On Tue, 4 Nov 2025 09:51:42 +1000 Gavin Shan <[email protected]> wrote:
Quoted 83 lines · Igor Mammedov
Quoted 79 lines · On Mon, 3 Nov 2025 09:02:54 +1000 Gavin Shan <[email protected]> wrote:
Quoted 62 lines · Igor Mammedov
Quoted 47 lines · On Sun, 19 Oct 2025 10:36:16 +1000 Gavin Shan <[email protected]> wrote:
Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

Quoted 8 lines

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

1) What I'm concerned about is that it target one specific case only. Imagine if 1st cpu get error on page1 and another on page2=(page1+host_page_size) and so on for other CPUs. Then we are back where we were before this series.

Quoted 9 lines

Also in abstract future when ARM gets 1Gb pages, that won't scale well.

Can we instead of making up CPERs to cover whole host page, create 1/vcpu GHES source?
That way when vcpu trips over bad page, it would have its own error status block to put errors in.
That would address [1] and deterministically scale
(well assuming that multiple SEA error sources are possible in theory)

I think it's a good idea to have individual error source for each vCPU. In this way, the read_ack_reg won't be a limitation. I hope Jonathan is ok to this scheme.

Currently, we have two (fixed) error sources like below. I assume the index of the error source per vCPU will starts from (ACPI_HEST_SRC_ID_QMP + 1) based on CPUState::cpu_index.

Quoted 7 lines
Quoted 2 lines

I'd suggest ditch cpu index and use arch_id instead.

arch_id, which is returned from CPUClass::get_arch_id(), is uint64_t. The error source index is uint16_t, as defined in ACPI spec 6.5 (section 18.3.2.7 Generic Hardware Error Source). So I think CPUState::cpu_index is the appropriate error source index.

Quoted 6 lines

while for ARM cpu_index might work, it's not stable on targets where CPU hotplug exists. Given it's generic ACPI code, It would be better to take this consideration into account.

(aka make a map of arch_id to src_id if necessary)

Yes, but it's a another factor that I prefer the current design (send 16x errors at once). Igor, v3 has been posted, please help to review when getting a chance, thanks a lot.

https://lists.nongnu.org/archive/html/qemu-arm/2025-11/msg00264.html

Thanks,
Gavin

Quoted 137 lines
Quoted 136 lines
Quoted 20 lines
Quoted 14 lines

enum AcpiGhesSourceID {
ACPI_HEST_SRC_ID_SYNC,
ACPI_HEST_SRC_ID_QMP, /* Use it only for QMP injected errors */
};

Quoted 5 lines

PS:
I also wonder what real HW does when it gets in similar situation (i.e. error status block is not yet acknowledged but another async error arrived for the same error source)?

Quoted 5 lines

I believe real HW also have this specific issue. As to ARM64, I ever did some google search and was told the error follows the firmware-first policy and handled by a component of trustfirmware-a. However, I was unable to get the source code. So it's hard for me to know how this specific issue is handled there.

Quoted 9 lines

Perhaps Jonathan can help with finding how real hw works around it?

My idea using per cpu source is just a speculation based on spec on how workaround the problem,
I don't really know if guest OS will be able to handle it (aka, need to be tested is it's viable). That also probably was a reason in previous review, why should've waited for multiple sources support be be merged first before this series.

Well, the point is the guest won't be full functional until the the problematic host page is isolated and replaced by another host page. To avoid crash the qemu still gives customer a chance to collect important information from the guest by luck.

Thanks,
Gavin

Quoted 96 lines
Quoted 95 lines
Quoted 94 lines
Quoted 93 lines
Quoted 92 lines
Quoted 91 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
     hw/acpi/ghes.c   |  2 +-
     target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
     2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
     #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
     /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
     /* Generic Hardware Error Source version 2 */
     #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
      */
 
     #include "qemu/osdep.h"
+#include "qemu/units.h"
     #include <sys/ioctl.h>
 
     #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                         uint64_t paddr)
     {
         GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
         int ret;
 
         kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
         ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
         if (ret) {
             goto error;
#24 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

In reply to Igor Mammedov
Quoted 76 lines · On Mon, 3 Nov 2025 10:52:16 +0100 Igor Mammedov <[email protected]> wrote:
Quoted 73 lines · On Mon, 3 Nov 2025 09:02:54 +1000 Gavin Shan <[email protected]> wrote:
Quoted 71 lines · Igor Mammedov
Quoted 47 lines · On Sun, 19 Oct 2025 10:36:16 +1000 Gavin Shan <[email protected]> wrote:
Quoted 12 lines · Igor Mammedov
Quoted 6 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

can you explain a bit more what goes wrong?

Quoted 9 lines

I'm especially interested in parallel access you've mentioned and why batch adding error records is needed
as opposed to adding records every time invalid access happens?

PS:
Assume I don't remember details on how HEST works, Answering it in this format also should improve commit message making it more digestible for uninitiated.

Thanks for your review and I'm trying to answer your question below. Please let me know if there are more questions.

There are two signals (BUS_MCEERR_AR and BUS_MCEERR_AO) and BUS_MCEERR_AR is concerned here. This signal BUS_MCEERR_AR is sent by host's stage2 page fault handler when the resolved host page has been marked as marked as poisoned. The stage2 page fault handler is invoked on every access to the host page.

In the combination where host and guest has 64KB and 4KB separately, A 64KB host page corresponds to 16x consecutive 4KB guest pages. It means we're accessing the 64KB host page when any of those 16x consecutive 4KB guest pages is accessed. In other words, a problematic 64KB host page affects the accesses on 16x 4KB guest pages. Those 16x 4KB guest pages can be owned by different threads on the guest and they run in parallel, potentially to access those 16x 4KB guest pages in parallel. It potentially leading to 16x BUS_MCEERR_AR signals at one point.

In current implementation, the error record is built as the following calltrace indicates. There are 16 error records in the extreme case (parallel accesses on 16x 4KB guest pages, mapped to one 64KB host page). However, we can't handle multiple error records at once due to the acknowledgement mechanism in ghes_record_cper_errors(). For example, the first error record has been sent, but not consumed by the guest yet. We fail to send the second error record.

Quoted 8 lines

kvm_arch_on_sigbus_vcpu
acpi_ghes_memory_errors
ghes_gen_err_data_uncorrectable_recoverable // Generic Error Data Entry
acpi_ghes_build_append_mem_cper // Memory Error
ghes_record_cper_errors

So this series improves this situation by simply sending 16x error records in one shot for the combination of 64KB host + 4KB guest.

1) What I'm concerned about is that it target one specific case only. Imagine if 1st cpu get error on page1 and another on page2=(page1+host_page_size) and so on for other CPUs. Then we are back where we were before this series.

Also in abstract future when ARM gets 1Gb pages, that won't scale well.

Can we instead of making up CPERs to cover whole host page, create 1/vcpu GHES source?
That way when vcpu trips over bad page, it would have its own error status block to put errors in.
That would address [1] and deterministically scale
(well assuming that multiple SEA error sources are possible in theory)

Quoted 20 lines
Quoted 6 lines

I think it's a good idea to have individual error source for each vCPU. In this way, the read_ack_reg won't be a limitation. I hope Jonathan is ok to this scheme.

Currently, we have two (fixed) error sources like below. I assume the index of the error source per vCPU will starts from (ACPI_HEST_SRC_ID_QMP + 1) based on CPUState::cpu_index.

I'd suggest ditch cpu index and use arch_id instead.

Quoted 11 lines

enum AcpiGhesSourceID {
ACPI_HEST_SRC_ID_SYNC,
ACPI_HEST_SRC_ID_QMP, /* Use it only for QMP injected errors */
};

Quoted 4 lines

PS:
I also wonder what real HW does when it gets in similar situation (i.e. error status block is not yet acknowledged but another async error arrived for the same error source)?

On a real hardware platform it can just queue them in firmware or block until the second CPU to arrive can proceed. Once first is processed the second is then exposed.

The particular case seen here of a sudden burst of errors in memory due to corruption of a larger range doesn't have an obvious equivalent as the CPER record carries granularity and you don't have the problem of 16 contiguous PA pages mapping to non contiguous GPA.

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

I believe real HW also have this specific issue. As to ARM64, I ever did some google search and was told the error follows the firmware-first policy and handled by a component of trustfirmware-a. However, I was unable to get the source code. So it's hard for me to know how this specific issue is handled there.

First thing is that I'd never make any assumptions about consistency of how this handled on different arm arch platforms. The only consistency is at the ACPI / UEFI spec level. Ours for example often have management controllers for RAS handling that are completely independent of what is running on the CPUs (e.g. TFA). All that actually matters though is there is considerable software involved in marshalling this data and that marshalling is not always per PE.

We have far fewer GHESv2 entries than we have CPUs but there are multiple of them with different types of error routed through particular subsets. I'm not sure of the exact way that this is done but we don't share GHESv2 for fatal and non fatal for instance. The kernel doesn't care what comes down each pipe so I've never looked at it closely.

Quoted 9 lines

Perhaps Jonathan can help with finding how real hw works around it?

My idea using per cpu source is just a speculation based on spec on how workaround the problem,
I don't really know if guest OS will be able to handle it (aka, need to be tested is it's viable). That also probably was a reason in previous review, why should've waited for multiple sources support be be merged first before this series.

Per vCPU should work fine but I do like the approach here of reporting all the related errors in one go as they represent the underlying nature of the error granularity tracking. If anyone ever poisons at the 1GiB level on the host they are on their own - so I think that it will only ever be the finest granularity supported (so worse case 64KiB).

Jonathan

Quoted 101 lines
Quoted 99 lines

Thanks,
Gavin

Quoted 93 lines
Quoted 92 lines
Quoted 91 lines
Quoted 90 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

---
   hw/acpi/ghes.c   |  2 +-
   target/arm/kvm.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
   2 files changed, 46 insertions(+), 2 deletions(-)
hw/acpi/ghes.c +1 -1
index 045b77715f..5c87b3a027 100644
@@ -33,7 +33,7 @@
   #define ACPI_HEST_ADDR_FW_CFG_FILE          "etc/acpi_table_hest_addr"
 
   /* The max size in bytes for one error block */
-#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (1 * KiB)
+#define ACPI_GHES_MAX_RAW_DATA_LENGTH   (4 * KiB)
 
   /* Generic Hardware Error Source version 2 */
   #define ACPI_GHES_SOURCE_GENERIC_ERROR_V2   10
target/arm/kvm.c +45 -1
index c5d5b3b16e..3ecb85e4b7 100644
@@ -11,6 +11,7 @@
    */
 
   #include "qemu/osdep.h"
+#include "qemu/units.h"
   #include <sys/ioctl.h>
 
   #include <linux/kvm.h>
@@ -2433,10 +2434,53 @@ static void push_ghes_memory_errors(CPUState *c, AcpiGhesState *ags,
                                       uint64_t paddr)
   {
       GArray *addresses = g_array_new(false, false, sizeof(paddr));
+    uint64_t val, start, end, guest_pgsz, host_pgsz;
       int ret;
 
       kvm_cpu_synchronize_state(c);
-    g_array_append_vals(addresses, &paddr, 1);
+
+    /*
+     * Sort out the guest page size from TCR_EL1, which can be modified
+     * by the guest from time to time. So we have to sort it out dynamically.
+     */
+    ret = read_sys_reg64(c->kvm_fd, &val, ARM64_SYS_REG(3, 0, 2, 0, 2));
+    if (ret) {
+        goto error;
+    }
+
+    switch (extract64(val, 14, 2)) {
+    case 0:
+        guest_pgsz = 4 * KiB;
+        break;
+    case 1:
+        guest_pgsz = 64 * KiB;
+        break;
+    case 2:
+        guest_pgsz = 16 * KiB;
+        break;
+    default:
+        error_report("unknown page size from TCR_EL1 (0x%" PRIx64 ")", val);
+        goto error;
+    }
+
+    host_pgsz = qemu_real_host_page_size();
+    start = paddr & ~(host_pgsz - 1);
+    end = start + host_pgsz;
+    while (start < end) {
+        /*
+         * The precise physical address is provided for the affected
+         * guest page that contains @paddr. Otherwise, the starting
+         * address of the guest page is provided.
+         */
+        if (paddr >= start && paddr < (start + guest_pgsz)) {
+            g_array_append_vals(addresses, &paddr, 1);
+        } else {
+            g_array_append_vals(addresses, &start, 1);
+        }
+
+        start += guest_pgsz;
+    }
+
       ret = acpi_ghes_memory_errors(ags, ACPI_HEST_SRC_ID_SYNC, addresses);
       if (ret) {
           goto error;    
author
#25 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Hi Jonathan and Igor,

Quoted 3 lines · Jonathan Cameron

On Mon, 3 Nov 2025 10:52:16 +0100
Igor Mammedov <[email protected]> wrote:

[...]

Quoted 7 lines
Quoted 6 lines

My idea using per cpu source is just a speculation based on spec on how workaround the problem,
I don't really know if guest OS will be able to handle it (aka, need to be tested is it's viable). That also probably was a reason in previous review, why should've waited for multiple sources support be be merged first before this series.

Quoted 6 lines

Per vCPU should work fine but I do like the approach here of reporting all the related errors in one go as they represent the underlying nature of the error granularity tracking. If anyone ever poisons at the 1GiB level on the host they are on their own - so I think that it will only ever be the finest granularity supported (so worse case 64KiB).

Well, I don't have strong opinions, but I intend to agree with Jonathan to report all 16x errors at once. One reason is one as Jonathan mentioned. Another reason is per vCPU error source is a bit heavy for the improvement.

So I'm going to improve (v2) series to address all received comments and post a (v3) series.

I already had the prototype of error source per vcpu, which works fine for 64KB-host-4KB-guest. However, it doesn't work for huge pages. For example, a problematic 512MB huge page can cause heavy memory error storm to QEMU where we absolutely can't handle.

1. Start the VM with hugetlb pages

/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64                                     \
-accel kvm -machine virt,gic-version=host,nvdimm=on,ras=on                                  \
-cpu host -smp maxcpus=8,cpus=8,sockets=2,clusters=2,cores=2,threads=1                      \
-m 4096M,slots=16,maxmem=128G                                                               \

-object memory-backend-file,id=mem0,prealloc=on,mem-path=/dev/hugepages-524288kB,size=4096M \
-numa node,nodeid=0,cpus=0-7,memdev=mem0 \

2. Run 'victim -d' on guest

guest$ ./victim -d
physical address of (0xffff889d6000) = 0x11a7da000 Hit any key to trigger error:

3. Inject error from host

host$ errinjct 0x11a7da000

4. QEMU crashes with error message "Bus error (core dumped)", which is triggered the following path.

sigbus_handler
kvm_on_sigbus_vcpu // have_sigbus_pending = 1
sigbus_reraise

Thanks,
Gavin

#26 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Quoted 52 lines · On Wed, 5 Nov 2025 10:40:10 +1000 Gavin Shan <[email protected]> wrote:

Hi Jonathan and Igor,

Quoted 3 lines · Jonathan Cameron

On Mon, 3 Nov 2025 10:52:16 +0100
Igor Mammedov <[email protected]> wrote:

[...]

Quoted 7 lines
Quoted 6 lines

My idea using per cpu source is just a speculation based on spec on how workaround the problem,
I don't really know if guest OS will be able to handle it (aka, need to be tested is it's viable). That also probably was a reason in previous review, why should've waited for multiple sources support be be merged first before this series.

Quoted 6 lines

Per vCPU should work fine but I do like the approach here of reporting all the related errors in one go as they represent the underlying nature of the error granularity tracking. If anyone ever poisons at the 1GiB level on the host they are on their own - so I think that it will only ever be the finest granularity supported (so worse case 64KiB).

Well, I don't have strong opinions, but I intend to agree with Jonathan to report all 16x errors at once. One reason is one as Jonathan mentioned. Another reason is per vCPU error source is a bit heavy for the improvement.

So I'm going to improve (v2) series to address all received comments and post a (v3) series.

I already had the prototype of error source per vcpu, which works fine for 64KB-host-4KB-guest. However, it doesn't work for huge pages. For example, a problematic 512MB huge page can cause heavy memory error storm to QEMU where we absolutely can't handle.

1. Start the VM with hugetlb pages

/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \

(quoted diff) +0 -5
-accel kvm -machine virt,gic-version=host,nvdimm=on,ras=on                                  \
-cpu host -smp maxcpus=8,cpus=8,sockets=2,clusters=2,cores=2,threads=1                      \
-m 4096M,slots=16,maxmem=128G                                                               \
-object memory-backend-file,id=mem0,prealloc=on,mem-path=/dev/hugepages-524288kB,size=4096M \
-numa node,nodeid=0,cpus=0-7,memdev=mem0                                                    \

2. Run 'victim -d' on guest

guest$ ./victim -d
physical address of (0xffff889d6000) = 0x11a7da000 Hit any key to trigger error:

3. Inject error from host

Quoted 8 lines

host$ errinjct 0x11a7da000

4. QEMU crashes with error message "Bus error (core dumped)", which is triggered the following path.

sigbus_handler
kvm_on_sigbus_vcpu // have_sigbus_pending = 1
sigbus_reraise

To me this sounds like something that should not be happening on the host unless a real memory error is detected that blows away the whole of / most of a huge page. I'm not sure we care about surviving that case if it isn't mapped using hugetlb/DAX or similar in the guest (so contiguous in both with contained impact in both).

I assume the issue is backing with hugetlbfs which doesn't have a sub huge page granularity for poison tracking. I vaguely recall an effort to solve that
https://lore.kernel.org/linux-mm/[email protected]/
was the first thing google threw me. Looks like it got to v2.
https://lore.kernel.org/linux-mm/[email protected]/

+CC James.

Quoted 5 lines

Thanks,
Gavin

author
#27 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Hi Jonathan,

On 11/5/25 7:02 PM, Jonathan Cameron wrote:

[...]

Quoted 37 lines
Quoted 23 lines

I already had the prototype of error source per vcpu, which works fine for 64KB-host-4KB-guest. However, it doesn't work for huge pages. For example, a problematic 512MB huge page can cause heavy memory error storm to QEMU where we absolutely can't handle.

1. Start the VM with hugetlb pages

/home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \

(quoted diff) +0 -5
-accel kvm -machine virt,gic-version=host,nvdimm=on,ras=on                                  \
-cpu host -smp maxcpus=8,cpus=8,sockets=2,clusters=2,cores=2,threads=1                      \
-m 4096M,slots=16,maxmem=128G                                                               \
-object memory-backend-file,id=mem0,prealloc=on,mem-path=/dev/hugepages-524288kB,size=4096M \
-numa node,nodeid=0,cpus=0-7,memdev=mem0                                                    \

2. Run 'victim -d' on guest

guest$ ./victim -d
physical address of (0xffff889d6000) = 0x11a7da000 Hit any key to trigger error:

3. Inject error from host

Quoted 8 lines

host$ errinjct 0x11a7da000

4. QEMU crashes with error message "Bus error (core dumped)", which is triggered the following path.

sigbus_handler
kvm_on_sigbus_vcpu // have_sigbus_pending = 1
sigbus_reraise

To me this sounds like something that should not be happening on the host unless a real memory error is detected that blows away the whole of / most of a huge page. I'm not sure we care about surviving that case if it isn't mapped using hugetlb/DAX or similar in the guest (so contiguous in both with contained impact in both).

Quoted 8 lines

I assume the issue is backing with hugetlbfs which doesn't have a sub huge page granularity for poison tracking. I vaguely recall an effort to solve that
https://lore.kernel.org/linux-mm/[email protected]/
was the first thing google threw me. Looks like it got to v2.
https://lore.kernel.org/linux-mm/[email protected]/

+CC James.

For this particular case where the guest memory is backed by 512MB hugetlb pages. There are 8 hugetlb pages since the guest has 4GB memory. I agree it's impossible to recover from this extreme situation for a couple of factors: (1) A problematic huge page is likely to be shared by multiple vCPUs. Multiple SIGBUS signals can be raised at once, but we're unable to handle; (2) The instruction (TEXT section) of guest's application or kernel can reside in the problematic huge page. Any instruction fetch just leads to SIGBUS signal, meaning the vCPUs can't continue their executions.

I'm summarizing my findings for above case, to make this thread complete at least.

Only one pending SIGBUS signal is allowed by QEMU in current implementation. Otherwise, it crashes in sigbus_handler() by a SIGBUS signal sent from sigbus_reraise().

  qemu
  ====
  sigbus_handler
    kvm_on_sigbus_vcpu
      have_sigbus_pending = true;
      qatomic_set(&cpu->exit_request, true)
           :
  kvm_cpu_exec
    kvm_cpu_kick_self
      kvm_cpu_kick
        qatomic_set(&cpu->kvm_run->immediate_exit, 1);
    kvm_vcpu_ioctl                                       // Return immediately
    kvm_arch_on_sigbus_vcpu
    have_sigbus_pending = true;

There are two SIGBUS signals raised by host before the target vCPU can be stopped. The first one is raised by host when the memory error is handled.

host
====
memory_failure
try_memory_failure_hugetlb
get_huge_page_for_hwpoison
__get_huge_page_for_hwpoison
folio_set_hugetlb_hwpoison
hwpoison_user_mappings
collect_procs // Collect tasks using the folio
unmap_poisoned_folio
try_to_unmap // TTU_HWPOISON
try_to_unmap_one
mmu_notifier_invalidate_range_start swp_entry_to_pte(make_hwpoison_entry(subpage))
set_huge_pte_at // Poisoned PMD
mmu_notifier_invalidate_range_end
kill_procs // Raise SIGBUS
identify_page_state

The second one is raised by the stage2 page fault handler due to the poisoned PMD.

kvm_handle_guest_abort
user_mem_abort
__kvm_faultin_pfn
kvm_follow_pfn
hva_to_pfn
hva_to_pfn_fast
hva_to_pfn_slow
get_user_pages_unlocked
__get_user_pages_locked
__get_user_pages
follow_page_mask // No PMD mapping
faultin_page
handle_mm_fault
hugetlb_fault
is_hugetlb_entry_hwpoisoned // Return VM_FAULT_HWPOISON_LARGE
kvm_send_hwpoison_signal // Raise SIGBUS

Thanks,
Gavin

#28 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

In reply to Gavin Shan
Quoted 7 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

Quoted 5 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

Subject to tests being added and the Docs update Mauro requested + follow on from earlier patch reviews, this looks good to me.

Jonathan

author
#29 lore raw

Re: [PATCH RESEND v2 3/3] target/arm/kvm: Support multiple memory CPERs injection

Quoted 10 lines · Jonathan Cameron
Quoted 7 lines · On Tue, 7 Oct 2025 16:08:10 +1000 Gavin Shan <[email protected]> wrote:

In the combination of 64KB host and 4KB guest, a problematic host page affects 16x guest pages. In this specific case, it's reasonable to push 16 consecutive memory CPERs. Otherwise, QEMU can run into core dump due to the current error can't be delivered as the previous error isn't acknoledges. It's caused by the nature the host page can be accessed in parallel due to the mismatched host and guest page sizes.

Quoted 8 lines
Quoted 5 lines

Imporve push_ghes_memory_errors() to push 16x consecutive memory CPERs for this specific case. The maximal error block size is bumped to 4KB, providing enough storage space for those 16x memory CPERs.

Subject to tests being added and the Docs update Mauro requested + follow on from earlier patch reviews, this looks good to me.

Yes, the ACPI tables were forgotten to be patched in the last respin. I will do in the next respin.

Thanks,
Gavin