diff options
author | qiaonuohan <qiaonuohan@cn.fujitsu.com> | 2014-02-18 14:11:31 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-02-28 11:52:03 -0500 |
commit | 7aad248d3596a1fb94778f2cd215f86a802b3abb (patch) | |
tree | cf039802f705f1d66100a0392fa50601ebc009d6 /include/sysemu/dump.h | |
parent | 607dacd0a082a4ea73a7a16a1c70406f37ebacdb (diff) |
dump: add members to DumpState and init some of them
add some members to DumpState that will be used in writing vmcore in
kdump-compressed format. some of them, like page_size, will be initialized
in the patch.
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/dump.h')
-rw-r--r-- | include/sysemu/dump.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h index b32b390805..995bf47003 100644 --- a/include/sysemu/dump.h +++ b/include/sysemu/dump.h @@ -20,6 +20,13 @@ #define VERSION_FLAT_HEADER (1) /* version of flattened format */ #define END_FLAG_FLAT_HEADER (-1) +#define ARCH_PFN_OFFSET (0) + +#define paddr_to_pfn(X, page_shift) \ + (((unsigned long long)(X) >> (page_shift)) - ARCH_PFN_OFFSET) +#define pfn_to_paddr(X, page_shift) \ + (((unsigned long long)(X) + ARCH_PFN_OFFSET) << (page_shift)) + typedef struct ArchDumpInfo { int d_machine; /* Architecture */ int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */ |