dump-guest-memory: using static DumpState, add DumpStatus

Instead of malloc/free each time for DumpState, make it
static. Added DumpStatus to show status for dump.

This is to be used for detached dump.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-Id: <1455772616-8668-4-git-send-email-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Peter Xu 2016-02-18 13:16:48 +08:00 committed by Paolo Bonzini
parent 228de9cf1d
commit baf28f57e2
3 changed files with 36 additions and 5 deletions

View file

@ -38,6 +38,7 @@
#include "sysemu/dump-arch.h"
#include "sysemu/memory_mapping.h"
#include "qapi-types.h"
typedef struct QEMU_PACKED MakedumpfileHeader {
char signature[16]; /* = "makedumpfile" */
@ -176,6 +177,7 @@ typedef struct DumpState {
off_t offset_page; /* offset of page part in vmcore */
size_t num_dumpable; /* number of page that can be dumped */
uint32_t flag_compress; /* indicate the compression format */
DumpStatus status; /* current dump status */
} DumpState;
uint16_t cpu_to_dump16(DumpState *s, uint16_t val);