summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2016-02-18 13:16:52 +0800
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:30 -0600
commit0333ae80eb4f7cca346b4b7e28dd1797f22bf6a2 (patch)
tree609420df97a2b9ab1c568af75de1340fc6eda3ee /include
parent2f62085d5b22fed7a21f237ce7f6d21f33307eef (diff)
downloadhqemu-0333ae80eb4f7cca346b4b7e28dd1797f22bf6a2.zip
hqemu-0333ae80eb4f7cca346b4b7e28dd1797f22bf6a2.tar.gz
dump-guest-memory: add "detach" support
If "detach" is provided, one thread is created to do the dump work, while main thread will return immediately. For each GuestPhysBlock, adding one more field "mr" to points to MemoryRegion that it belongs, also ref the mr before use. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1455772616-8668-8-git-send-email-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/dump.h1
-rw-r--r--include/sysemu/memory_mapping.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index 1da3ddb..06393c3 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -181,6 +181,7 @@ typedef struct DumpState {
bool has_format; /* whether format is provided */
DumpGuestMemoryFormat format; /* valid only if has_format == true */
+ QemuThread dump_thread; /* thread for detached dump */
} DumpState;
uint16_t cpu_to_dump16(DumpState *s, uint16_t val);
diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h
index a75d59a..d46d879 100644
--- a/include/sysemu/memory_mapping.h
+++ b/include/sysemu/memory_mapping.h
@@ -16,6 +16,7 @@
#include "qemu/queue.h"
#include "qemu/typedefs.h"
+#include "exec/memory.h"
typedef struct GuestPhysBlock {
/* visible to guest, reflects PCI hole, etc */
@@ -27,6 +28,9 @@ typedef struct GuestPhysBlock {
/* points into host memory */
uint8_t *host_addr;
+ /* points to the MemoryRegion that this block belongs to */
+ MemoryRegion *mr;
+
QTAILQ_ENTRY(GuestPhysBlock) next;
} GuestPhysBlock;
OpenPOWER on IntegriCloud