On 7/21/22 16:36, Marc-André Lureau wrote:
[..]
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index 2b39abeeae..7025e50682 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -166,11 +166,10 @@ typedef struct DumpState {
      hwaddr memory_offset;
      int fd;

-    GuestPhysBlock *next_block;
-    ram_addr_t start;
-    bool has_filter;
-    int64_t begin;
-    int64_t length;
+    /* Guest memory related data */
+    bool has_filter;           /* Are we dumping parts of the memory? */
+    int64_t begin;             /* Start address of the chunk we want to dump */
+    int64_t length;            /* Length of the dump we want to dump */

      uint8_t *note_buf;          /* buffer for notes */
      size_t note_buf_offset;     /* the writing place in note_buf */
--
2.34.1


My suggestion in v2 review was to introduce each function &
refactoring independently, if possible. And it looks like the
validate_start_block() change could be a 3rd patch too.



Alright, I just squashed and split this into 5 patches:
 * Introducing the 2 new functions
 * Converting dump_iterate and removing get_next_block
 * get_start_block -> validate_start_block
* Removal of next_block and start from DumpState, last user was get_start_block
 * Re-work of dump_calculate_size


I don't think we can easily adapt to dump_get_memblock_size() and dump_get_memblock_start() independently.

I'll also move the DumpState comment hunk to the removal of start and next_block tomorrow.

Reply via email to