thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
62547e
From 7e8d6290099b33f88621b45e62652a97704c9573 Mon Sep 17 00:00:00 2001
62547e
From: Janosch Frank <frankja@linux.ibm.com>
62547e
Date: Mon, 17 Oct 2022 08:38:15 +0000
62547e
Subject: [PATCH 34/42] dump: Reorder struct DumpState
62547e
MIME-Version: 1.0
62547e
Content-Type: text/plain; charset=UTF-8
62547e
Content-Transfer-Encoding: 8bit
62547e
62547e
RH-Author: Cédric Le Goater <clg@redhat.com>
62547e
RH-MergeRequest: 226: s390: Enhanced Interpretation for PCI Functions and Secure Execution guest dump
62547e
RH-Bugzilla: 1664378 2043909
62547e
RH-Acked-by: Thomas Huth <thuth@redhat.com>
62547e
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
62547e
RH-Acked-by: Jon Maloy <jmaloy@redhat.com>
62547e
RH-Commit: [34/41] 8d44e5e8c86ea5b33644eba141046cd657d0071e
62547e
62547e
Let's move ELF related members into one block and guest memory related
62547e
ones into another to improve readability.
62547e
62547e
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
62547e
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
62547e
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
62547e
Message-Id: <20221017083822.43118-4-frankja@linux.ibm.com>
62547e
(cherry picked from commit 8384b73c46fd474847d7e74d121318e344edc3c4)
62547e
Signed-off-by: Cédric Le Goater <clg@redhat.com>
62547e
---
62547e
 include/sysemu/dump.h | 16 +++++++++-------
62547e
 1 file changed, 9 insertions(+), 7 deletions(-)
62547e
62547e
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
62547e
index 9995f65dc8..9ed811b313 100644
62547e
--- a/include/sysemu/dump.h
62547e
+++ b/include/sysemu/dump.h
62547e
@@ -154,15 +154,8 @@ typedef struct DumpState {
62547e
     GuestPhysBlockList guest_phys_blocks;
62547e
     ArchDumpInfo dump_info;
62547e
     MemoryMappingList list;
62547e
-    uint32_t phdr_num;
62547e
-    uint32_t shdr_num;
62547e
     bool resume;
62547e
     bool detached;
62547e
-    ssize_t note_size;
62547e
-    hwaddr shdr_offset;
62547e
-    hwaddr phdr_offset;
62547e
-    hwaddr section_offset;
62547e
-    hwaddr note_offset;
62547e
     hwaddr memory_offset;
62547e
     int fd;
62547e
 
62547e
@@ -177,6 +170,15 @@ typedef struct DumpState {
62547e
     int64_t filter_area_begin;  /* Start address of partial guest memory area */
62547e
     int64_t filter_area_length; /* Length of partial guest memory area */
62547e
 
62547e
+    /* Elf dump related data */
62547e
+    uint32_t phdr_num;
62547e
+    uint32_t shdr_num;
62547e
+    ssize_t note_size;
62547e
+    hwaddr shdr_offset;
62547e
+    hwaddr phdr_offset;
62547e
+    hwaddr section_offset;
62547e
+    hwaddr note_offset;
62547e
+
62547e
     void *elf_section_hdrs;     /* Pointer to section header buffer */
62547e
 
62547e
     uint8_t *note_buf;          /* buffer for notes */
62547e
-- 
62547e
2.37.3
62547e