[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 3/9] dump: Move struct definition into dump_memro
From: |
qiaonuohan |
Subject: |
[Qemu-devel] [PATCH v4 3/9] dump: Move struct definition into dump_memroy.h |
Date: |
Tue, 28 May 2013 10:50:31 +0800 |
From: Qiao Nuohan <address@hidden>
Move definition of struct DumpState into include/sysemu/dump_memory.h.
Signed-off-by: Qiao Nuohan <address@hidden>
Reviewed-by: Zhang Xiaohe <address@hidden>
---
dump.c | 22 +---------------------
include/sysemu/dump_memory.h | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 21 deletions(-)
create mode 100644 include/sysemu/dump_memory.h
diff --git a/dump.c b/dump.c
index c0d3da5..9ac66be 100644
--- a/dump.c
+++ b/dump.c
@@ -15,10 +15,9 @@
#include "elf.h"
#include "cpu.h"
#include "exec/cpu-all.h"
-#include "exec/hwaddr.h"
#include "monitor/monitor.h"
#include "sysemu/kvm.h"
-#include "sysemu/dump.h"
+#include "sysemu/dump_memory.h"
#include "sysemu/sysemu.h"
#include "sysemu/memory_mapping.h"
#include "qapi/error.h"
@@ -57,25 +56,6 @@ static uint64_t cpu_convert_to_target64(uint64_t val, int
endian)
return val;
}
-typedef struct DumpState {
- ArchDumpInfo dump_info;
- MemoryMappingList list;
- uint16_t phdr_num;
- uint32_t sh_info;
- bool have_section;
- bool resume;
- size_t note_size;
- hwaddr memory_offset;
- int fd;
-
- RAMBlock *block;
- ram_addr_t start;
- bool has_filter;
- int64_t begin;
- int64_t length;
- Error **errp;
-} DumpState;
-
static int dump_cleanup(DumpState *s)
{
int ret = 0;
diff --git a/include/sysemu/dump_memory.h b/include/sysemu/dump_memory.h
new file mode 100644
index 0000000..ce22c05
--- /dev/null
+++ b/include/sysemu/dump_memory.h
@@ -0,0 +1,40 @@
+/*
+ * QEMU dump memory
+ *
+ * Copyright (C) 2013 FUJITSU LIMITED
+ *
+ * Authors:
+ * Qiao Nuohan <address@hidden>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef DUMP_MEMORY_H
+#define DUMP_MEMORY_H
+
+#include "exec/cpu-all.h"
+#include "sysemu/memory_mapping.h"
+#include "sysemu/dump.h"
+
+typedef struct DumpState {
+ ArchDumpInfo dump_info;
+ MemoryMappingList list;
+ uint16_t phdr_num;
+ uint32_t sh_info;
+ bool have_section;
+ bool resume;
+ size_t note_size;
+ hwaddr memory_offset;
+ int fd;
+
+ RAMBlock *block;
+ ram_addr_t start;
+ bool has_filter;
+ int64_t begin;
+ int64_t length;
+ Error **errp;
+} DumpState;
+
+#endif
--
1.7.1
- [Qemu-devel] [PATCH v4 0/9] Make 'dump-guest-memory' dump in kdump-compressed format, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 3/9] dump: Move struct definition into dump_memroy.h,
qiaonuohan <=
- [Qemu-devel] [PATCH v4 1/9] dump: Add API to manipulate dump_bitmap, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 7/9] dump: Add API to free memory used by creating header, bitmap and page, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 2/9] dump: Add API to manipulate cache_data, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 5/9] dump: Add API to create data of dump bitmap, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 4/9] dump: Add API to create header of vmcore, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 8/9] dump: Add API to write header, bitmap and page into vmcore, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 6/9] dump: Add API to create page, qiaonuohan, 2013/05/27
- [Qemu-devel] [PATCH v4 9/9] dump: Make kdump-compressed format available for 'dump-guest-memory', qiaonuohan, 2013/05/27