From: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
To: qemu-devel@nongnu.org
Cc: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Subject: [Qemu-devel] [PATCH 3/9] Move include and struct definition to dump.h
Date: Tue, 7 May 2013 15:16:41 +0800 [thread overview]
Message-ID: <1367911007-13990-4-git-send-email-qiaonuohan@cn.fujitsu.com> (raw)
In-Reply-To: <1367911007-13990-1-git-send-email-qiaonuohan@cn.fujitsu.com>
Move includes and definition of struct DumpState into include/sysemu/dump.h.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Zhang Xiaohe <zhangxh@cn.fujitsu.com>
---
dump.c | 30 ------------------------------
include/sysemu/dump.h | 31 +++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/dump.c b/dump.c
index c0d3da5..3785a68 100644
--- a/dump.c
+++ b/dump.c
@@ -11,18 +11,7 @@
*
*/
-#include "qemu-common.h"
-#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/sysemu.h"
-#include "sysemu/memory_mapping.h"
-#include "qapi/error.h"
-#include "qmp-commands.h"
static uint16_t cpu_convert_to_target16(uint16_t val, int endian)
{
@@ -57,25 +46,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.h b/include/sysemu/dump.h
index b8c770f..c4c90c4 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -14,12 +14,43 @@
#ifndef DUMP_H
#define DUMP_H
+#include "qemu-common.h"
+#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/sysemu.h"
+#include "sysemu/memory_mapping.h"
+#include "qapi/error.h"
+#include "qmp-commands.h"
+
typedef struct ArchDumpInfo {
int d_machine; /* Architecture */
int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */
int d_class; /* ELFCLASS32 or ELFCLASS64 */
} ArchDumpInfo;
+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;
+
int cpu_get_dump_info(ArchDumpInfo *info);
ssize_t cpu_get_note_size(int class, int machine, int nr_cpus);
--
1.7.1
next prev parent reply other threads:[~2013-05-07 8:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 7:16 [Qemu-devel] [PATCH 0/9] Make monitor command 'dump-guest-memory' dump in kdump-compressed format Qiao Nuohan
2013-05-07 7:16 ` [Qemu-devel] [PATCH 1/9] Add API to manipulate dump_bitmap Qiao Nuohan
2013-05-07 16:14 ` Eric Blake
2013-05-07 16:23 ` Daniel P. Berrange
2013-05-08 8:39 ` qiaonuohan
2013-05-07 7:16 ` [Qemu-devel] [PATCH 2/9] Add API to manipulate cache_data Qiao Nuohan
2013-05-07 7:16 ` Qiao Nuohan [this message]
2013-05-11 13:36 ` [Qemu-devel] [PATCH 3/9] Move include and struct definition to dump.h Andreas Färber
2013-05-07 7:16 ` [Qemu-devel] [PATCH 4/9] Add API to create header of vmcore Qiao Nuohan
2013-05-07 7:16 ` [Qemu-devel] [PATCH 5/9] Add API to create data of dump bitmap Qiao Nuohan
2013-05-07 7:16 ` [Qemu-devel] [PATCH 6/9] Add API to create page Qiao Nuohan
2013-05-07 7:16 ` [Qemu-devel] [PATCH 7/9] Add API to free buf used by creating header, bitmap and page Qiao Nuohan
2013-05-07 7:16 ` [Qemu-devel] [PATCH 8/9] Add API to write header, bitmap and page into vmcore Qiao Nuohan
2013-05-07 7:16 ` [Qemu-devel] [PATCH 9/9] Make monitor command 'dump-guest-memory' dump in kdump-compressed format Qiao Nuohan
2013-05-07 17:13 ` Eric Blake
2013-05-08 8:50 ` qiaonuohan
2013-05-08 17:16 ` Eric Blake
2013-05-09 5:27 ` Zhang Xiaohe
2013-05-09 14:51 ` Eric Blake
2013-05-10 1:21 ` Zhang Xiaohe
2013-05-08 9:03 ` [Qemu-devel] [PATCH 0/9] " HATAYAMA Daisuke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367911007-13990-4-git-send-email-qiaonuohan@cn.fujitsu.com \
--to=qiaonuohan@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).