qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/9] Make monitor command 'dump-guest-memory' dump i


From: Qiao Nuohan
Subject: [Qemu-devel] [PATCH 0/9] Make monitor command 'dump-guest-memory' dump in kdump-compressed format
Date: Tue, 7 May 2013 15:16:38 +0800

Hi, all

Command 'dump-guest-memory' was introduced to dump guest's memory. But the
vmcore's format is only elf32 or elf64. The message is here:
http://lists.gnu.org/archive/html/qemu-devel/2012-04/msg03379.html

These patches are used to make 'dump-guest-memory' be able to dump guest's
memory in kdump-compressed format. Then vmcore can be much smaller, and
easily be delivered.

Note, similar to 'dump-guest-memory':
1. The guest should be x86 or x86_64. The other arch is not supported now.
2. If the OS is in the second kernel, gdb may not work well, and crash can
   work by specifying '--machdep phys_addr=xxx' in the command line. The
   reason is that the second kernel will update the page table, and we can
   not get the page table for the first kernel.
3. The cpu's state is stored in QEMU note.
4. The vmcore are able to be compressed with zlib, lzo or snappy. zlib is
   available by default, and option '--enable-lzo' or '--enable-snappy'
   should be used with configure to make lzo or snappy available.

  the kdump-compressed format is:
                                               File offset
  +------------------------------------------+ 0x0
  |    main header (struct disk_dump_header) |
  |------------------------------------------+ block 1
  |    sub header (struct kdump_sub_header)  |
  |------------------------------------------+ block 2
  |            1st-dump_bitmap               |
  |------------------------------------------+ block 2 + X blocks
  |            2nd-dump_bitmap               | (aligned by block)
  |------------------------------------------+ block 2 + 2 * X blocks
  |  page desc for pfn 0 (struct page_desc)  | (aligned by block)
  |  page desc for pfn 1 (struct page_desc)  |
  |                    :                     |
  |  page desc for pfn Z (struct page_desc)  |
  |------------------------------------------| (not aligned by block)
  |         page data (pfn 0)                |
  |         page data (pfn 1)                |
  |                        :                 |
  |         page data (pfn Z)                |
  +------------------------------------------+ offset_eraseinfo
  |                    :                     |
  +------------------------------------------+

qiaonuohan & other (9):
  Add API to manipulate dump_bitmap
  Add API to manipulate cache_data
  Move include and struct definition to dump.h
  Add API to create header of vmcore
  Add API to create data of dump bitmap
  Add API to create page
  Add API to free buf used by creating header, bitmap and page
  Add API to write header, bitmap and page into vmcore
  Make monitor command 'dump-guest-memory' dump in kdump-compressed
    format

 Makefile.target       |    2 +-
 cache_data.c          |  114 +++++++
 configure             |   50 +++
 dump.c                |  849 ++++++++++++++++++++++++++++++++++++++++++++++---
 dump_bitmap.c         |  162 ++++++++++
 hmp-commands.hx       |    8 +-
 hmp.c                 |    9 +-
 include/cache_data.h  |   52 +++
 include/dump_bitmap.h |   57 ++++
 include/sysemu/dump.h |  177 ++++++++++
 qapi-schema.json      |    6 +-
 qmp-commands.hx       |    5 +-
 12 files changed, 1442 insertions(+), 49 deletions(-)
 create mode 100644 cache_data.c
 create mode 100644 dump_bitmap.c
 create mode 100644 include/cache_data.h
 create mode 100644 include/dump_bitmap.h





reply via email to

[Prev in Thread] Current Thread [Next in Thread]