diff options
author | qiaonuohan | 2014-02-18 07:11:34 +0100 |
---|---|---|
committer | Luiz Capitulino | 2014-02-28 17:52:03 +0100 |
commit | 64cfba6a47411092c941c8d17256fb5673cc8cbf (patch) | |
tree | b2af0c388d7029ac775dceffd45baf20a020153c /include/sysemu | |
parent | dump: add API to write dump_bitmap (diff) | |
download | qemu-64cfba6a47411092c941c8d17256fb5673cc8cbf.tar.gz qemu-64cfba6a47411092c941c8d17256fb5673cc8cbf.tar.xz qemu-64cfba6a47411092c941c8d17256fb5673cc8cbf.zip |
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 6d4d0bcc3c..92a95e4b92 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); |