From: William Roche <william.roche@oracle.com>
In case of a large page impacted by a memory error, provide an
information about the impacted large page before the memory
error injection message.
This message would also appear on ras enabled ARM platforms, with
the introduction of an x86 similar error injection message.
In the case of a large page impacted, we now report:
Memory Error on large page from <backend>:<address>+<fd_offset> +<page_size>
Signed-off-by: William Roche <william.roche@oracle.com>
---
accel/kvm/kvm-all.c | 11 +++++++++++
include/exec/cpu-common.h | 9 +++++++++
system/physmem.c | 21 +++++++++++++++++++++
target/arm/kvm.c | 3 +++
4 files changed, 44 insertions(+)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index f89568bfa3..08e14f8960 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -1296,6 +1296,17 @@ static void kvm_unpoison_all(void *param)
void kvm_hwpoison_page_add(ram_addr_t ram_addr)
{
HWPoisonPage *page;
+ struct RAMBlockInfo rb_info;
+
+ if (qemu_ram_block_location_info_from_addr(ram_addr, &rb_info)) {
+ size_t ps = rb_info.page_size;