diff options
author | qiaonuohan <qiaonuohan@cn.fujitsu.com> | 2014-02-18 14:11:34 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-02-28 11:52:03 -0500 |
commit | 64cfba6a47411092c941c8d17256fb5673cc8cbf (patch) | |
tree | b2af0c388d7029ac775dceffd45baf20a020153c /include/sysemu | |
parent | d0686c7291fe8f0210e7a666f80892fa71395510 (diff) | |
download | hqemu-64cfba6a47411092c941c8d17256fb5673cc8cbf.zip hqemu-64cfba6a47411092c941c8d17256fb5673cc8cbf.tar.gz |
dump: add APIs to operate DataCache
DataCache is used to store data temporarily, then the data will be written to
vmcore. These functions will be called later when writing data of page to
vmcore.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/dump.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h index 6d4d0bc..92a95e4 100644 --- a/include/sysemu/dump.h +++ b/include/sysemu/dump.h @@ -41,6 +41,7 @@ #define DISKDUMP_HEADER_BLOCKS (1) #define BUFSIZE_BITMAP (TARGET_PAGE_SIZE) #define PFN_BUFBITMAP (CHAR_BIT * BUFSIZE_BITMAP) +#define BUFSIZE_DATA_CACHE (TARGET_PAGE_SIZE * 4) typedef struct ArchDumpInfo { int d_machine; /* Architecture */ @@ -142,6 +143,14 @@ typedef struct QEMU_PACKED KdumpSubHeader64 { uint64_t max_mapnr_64; /* header_version 6 and later */ } KdumpSubHeader64; +typedef struct DataCache { + int fd; /* fd of the file where to write the cached data */ + uint8_t *buf; /* buffer for cached data */ + size_t buf_size; /* size of the buf */ + size_t data_size; /* size of cached data in buf */ + off_t offset; /* offset of the file */ +} DataCache; + struct GuestPhysBlockList; /* memory_mapping.h */ int cpu_get_dump_info(ArchDumpInfo *info, const struct GuestPhysBlockList *guest_phys_blocks); |