Re: [Qemu-devel] [PATCH 7/8] dump: Fix use-after-free in create_kdump_vmcore()

2014-05-26 Thread qiaonuohan
On 05/27/2014 09:40 AM, arei.gong...@huawei.com wrote: From: Gonglei Spotted by Coverity: (7) Event closed_arg: "write_dump_pages(DumpState *)" closes "s->fd". [details] Also see events: [pass_closed_arg] 1490ret = write_dump_pages(s); (8) Event cond_false: Condition "ret< 0", taki

Re: [Qemu-devel] [PATCH] configure: Enable dead code (lzo, snappy, quorum)

2014-04-28 Thread qiaonuohan
On 04/29/2014 02:21 PM, Stefan Weil wrote: Those options were not enabled by default, even when the build environment would have supported them, so the corresponding code was not compiled in normal test builds like on build bots. Signed-off-by: Stefan Weil Reviewed-by: Qiao Nuohan --- I'm

Re: [Qemu-devel] [PATCH v2 0/2] HMP: support specifying dump format for dump-guest-memory

2014-04-23 Thread qiaonuohan
On 04/23/2014 09:30 PM, Luiz Capitulino wrote: On Wed, 23 Apr 2014 12:38:12 +0200 Christian Borntraeger wrote: On 17/04/14 10:15, Qiao Nuohan wrote: The last version is here: http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg00018.html ChangLog: Changes from v7 to v8: 1. add a patc

Re: [Qemu-devel] [PATCH v2 0/2] HMP: support specifying dump format for dump-guest-memory

2014-04-21 Thread qiaonuohan
On 04/17/2014 04:15 PM, Qiao Nuohan wrote: The last version is here: http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg00018.html ChangLog: Changes from v7 to v8: 1. add a patch to fix doc of dump-guest-memory Qiao Nuohan (2): HMP: fix doc of dump-guest-memory HMP: support speci

Re: [Qemu-devel] [PATCH v2 0/2] HMP: support specifying dump format for dump-guest-memory

2014-04-17 Thread qiaonuohan
On 04/16/2014 04:51 PM, Qiao Nuohan wrote: The last version is here: http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg00018.html ChangLog: Changes from v7 to v8: 1. add a patch to fix doc of dump-guest-memory Qiao Nuohan (2): HMP: fix doc of dump-guest-memory HMP: support speci

Re: [Qemu-devel] [PATCH] HMP: support specifying dump format for dump-guest-memory

2014-04-08 Thread qiaonuohan
ping... On 04/03/2014 08:16 PM, Christian Borntraeger wrote: On 01/04/14 15:25, Christian Borntraeger wrote: On 01/04/14 10:33, Qiao Nuohan wrote: Dumping guest memory is available to specify the dump format now. This patch adds options '-z|-l|-s' to HMP command dump-guest-memory to specify du

Re: [Qemu-devel] hmp interface for kdump compressed format

2014-04-01 Thread qiaonuohan
Hello guys, I have sent the patch, please check here: http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg00018.html On 03/27/2014 04:38 PM, Markus Armbruster wrote: "qiaonuo...@cn.fujitsu.com" writes: On 03/27/2014 01:04 AM, Markus Armbruster wrote: So something like adding dum

[Qemu-devel] [PATCH v9 11/14] dump: add API to write dump pages

2014-02-17 Thread qiaonuohan
functions are used to write page to vmcore. vmcore is written page by page. page desc is used to store the information of a page, including a page's size, offset, compression format, etc. Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dump.c| 231 +

[Qemu-devel] [PATCH v9 10/14] dump: add APIs to operate DataCache

2014-02-17 Thread qiaonuohan
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 Reviewed-by: Laszlo Ersek --- dump.c| 47 +++

[Qemu-devel] [PATCH v9 06/14] dump: add support for lzo/snappy

2014-02-17 Thread qiaonuohan
kdump-compressed format supports three compression format, zlib/lzo/snappy. Currently, only zlib is available. This patch is used to support lzo/snappy. '--enable-lzo/--enable-snappy' is needed to be specified with configure to make lzo/snappy available for qemu Signed-off-by: Qiao Nuohan Reviewe

[Qemu-devel] [PATCH v9 12/14] dump: make kdump-compressed format available for 'dump-guest-memory'

2014-02-17 Thread qiaonuohan
Make monitor command 'dump-guest-memory' be able to dump in kdump-compressed format. The command's usage: dump [-p] protocol [begin] [length] [format] 'format' is used to specified the format of vmcore and can be: 1. 'elf': ELF format, without compression 2. 'kdump-zlib': kdump-compressed forma

[Qemu-devel] [PATCH v9 01/14] dump: const-qualify the buf of WriteCoreDumpFunction

2014-02-17 Thread qiaonuohan
WriteCoreDumpFunction is a function pointer that points to the function used to write content in "buf" into core file, so "buf" should be const-qualify. Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dump.c|2 +- include/qom/cpu.h |3 ++- 2 files changed, 3 inserti

[Qemu-devel] [PATCH v9 04/14] dump: add API to write vmcore

2014-02-17 Thread qiaonuohan
Function is used to write vmcore in flatten format. In flatten format, data is written block by block, and in front of each block, a struct MakedumpfileDataHeader is stored there to indicate the offset and size of the data block. struct MakedumpfileDataHeader { int64_t offset; int64_t buf_

[Qemu-devel] [PATCH v9 07/14] dump: add members to DumpState and init some of them

2014-02-17 Thread qiaonuohan
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 Reviewed-by: Laszlo Ersek --- dump.c| 28 include/sysemu/dump.h

[Qemu-devel] [PATCH v9 03/14] dump: add API to write header of flatten format

2014-02-17 Thread qiaonuohan
flatten format will be used when writing kdump-compressed format. The format is also used by makedumpfile, you can refer to the following URL to get more detailed information about flatten format of kdump-compressed format: http://sourceforge.net/projects/makedumpfile/ The two functions here are u

[Qemu-devel] [PATCH v9 09/14] dump: add API to write dump_bitmap

2014-02-17 Thread qiaonuohan
functions are used to write 1st and 2nd dump_bitmap of kdump-compressed format, which is used to indicate whether the corresponded page is existed in vmcore. 1st and 2nd dump_bitmap are same, because dump level is specified to 1 here. Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dum

[Qemu-devel] [PATCH v9 05/14] dump: add API to write elf notes to buffer

2014-02-17 Thread qiaonuohan
the function can be used by write_elf32_notes/write_elf64_notes to write notes to a buffer. If fd_write_vmcore is used, write_elf32_notes/write_elf64_notes will write elf notes to vmcore directly. Instead, if buf_write_note is used, elf notes will be written to opaque->note_buf at first. Signed-of

[Qemu-devel] [PATCH v9 08/14] dump: add API to write dump header

2014-02-17 Thread qiaonuohan
the functions are used to write header of kdump-compressed format to vmcore. Header of kdump-compressed format includes: 1. common header: DiskDumpHeader32 / DiskDumpHeader64 2. sub header: KdumpSubHeader32 / KdumpSubHeader64 3. extra information: only elf notes here Signed-off-by: Qiao Nuohan Re

[Qemu-devel] [PATCH v9 14/14] dump: add 'query-dump-guest-memory-capability' command

2014-02-17 Thread qiaonuohan
'query-dump-guest-memory-capability' is used to query the available formats for 'dump-guest-memory'. The output of the command will be like: -> { "execute": "query-dump-guest-memory-capability" } <- { "return": { "formats": ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }

[Qemu-devel] [PATCH v9 13/14] Define the architecture for compressed dump format

2014-02-17 Thread qiaonuohan
Signed-off-by: Ekaterina Tumanova Reviewed-by: Laszlo Ersek Reviewed-by: Qiao Nuohan --- dump.c |7 +-- target-i386/cpu.h |2 ++ target-s390x/cpu.h |1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dump.c b/dump.c index fb0c896..2c81318 100644 ---

[Qemu-devel] [PATCH v9 02/14] dump: add argument to write_elfxx_notes

2014-02-17 Thread qiaonuohan
write_elf32_notes/wirte_elf64_notes use fd_write_vmcore to write elf notes to vmcore. Adding parameter "WriteCoreDumpFunction f" makes it available to choose the method of writing elf notes Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dump.c | 16 1 files changed,

[Qemu-devel] [PATCH v9 00/14] Make 'dump-guest-memory' dump in kdump-compressed format

2014-02-17 Thread qiaonuohan
ase Changes from v2 to v3: 1. Address Eric's comment Changes from v1 to v2: 1. Address Eric & Daniel's comment: fix manner of string copy. 2. Address Eric's comment: replace reinventing new constants by using the ready-made ones accoring. 3. Address Andreas's comment:

[Qemu-devel] [PATCH v8 00/13] Make 'dump-guest-memory' dump in kdump-compressed format

2014-01-27 Thread qiaonuohan
Andreas's comments about coding style Changes from v3 to v4: 1. change to avoid conflict with Andreas's patches 2. rebase Changes from v2 to v3: 1. Address Eric's comment Changes from v1 to v2: 1. Address Eric & Daniel's comment: fix manner of string copy. 2. Address Eric&

[Qemu-devel] [PATCH v8 09/13] dump: add API to write dump_bitmap

2014-01-27 Thread qiaonuohan
functions are used to write 1st and 2nd dump_bitmap of kdump-compressed format, which is used to indicate whether the corresponded page is existed in vmcore. 1st and 2nd dump_bitmap are same, because dump level is specified to 1 here. Signed-off-by: Qiao Nuohan --- dump.c| 164 +

[Qemu-devel] [PATCH v8 05/13] dump: add API to write elf notes to buffer

2014-01-27 Thread qiaonuohan
the function can be used by write_elf32_notes/write_elf64_notes to write notes to a buffer. If fd_write_vmcore is used, write_elf32_notes/write_elf64_notes will write elf notes to vmcore directly. Instead, if buf_write_note is used, elf notes will be written to opaque->note_buf at first. Signed-of

[Qemu-devel] [PATCH v8 01/13] dump: const-qualify the buf of WriteCoreDumpFunction

2014-01-27 Thread qiaonuohan
WriteCoreDumpFunction is a function pointer that points to the function used to write content in "buf" into core file, so "buf" should be const-qualify. Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dump.c|2 +- include/qom/cpu.h |3 ++- 2 files changed, 3 inserti

[Qemu-devel] [PATCH v8 07/13] dump: add members to DumpState and init some of them

2014-01-27 Thread qiaonuohan
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 --- dump.c| 28 include/sysemu/dump.h |7 +++ 2 files ch

[Qemu-devel] [PATCH v8 10/13] dump: add APIs to operate DataCache

2014-01-27 Thread qiaonuohan
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 Reviewed-by: Laszlo Ersek --- dump.c| 47 +++

[Qemu-devel] [PATCH v8 12/13] dump: make kdump-compressed format available for 'dump-guest-memory'

2014-01-27 Thread qiaonuohan
Make monitor command 'dump-guest-memory' be able to dump in kdump-compressed format. The command's usage: dump [-p] protocol [begin] [length] [format] 'format' is used to specified the format of vmcore and can be: 1. 'elf': ELF format, without compression 2. 'kdump-zlib': kdump-compressed forma

[Qemu-devel] [PATCH v8 04/13] dump: add API to write vmcore

2014-01-27 Thread qiaonuohan
Function is used to write vmcore in flatten format. In flatten format, data is written block by block, and in front of each block, a struct MakedumpfileDataHeader is stored there to indicate the offset and size of the data block. struct MakedumpfileDataHeader { int64_t offset; int64_t buf_

[Qemu-devel] [PATCH v8 11/13] dump: add API to write dump pages

2014-01-27 Thread qiaonuohan
functions are used to write page to vmcore. vmcore is written page by page. page desc is used to store the information of a page, including a page's size, offset, compression format, etc. Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dump.c| 231 +

[Qemu-devel] [PATCH v8 08/13] dump: add API to write dump header

2014-01-27 Thread qiaonuohan
the functions are used to write header of kdump-compressed format to vmcore. Header of kdump-compressed format includes: 1. common header: DiskDumpHeader32 / DiskDumpHeader64 2. sub header: KdumpSubHeader32 / KdumpSubHeader64 3. extra information: only elf notes here Signed-off-by: Qiao Nuohan Re

[Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-01-27 Thread qiaonuohan
'query-dump-guest-memory-capability' is used to query whether option 'format' is available for 'dump-guest-memory' and the available format. The output of the command will be like: -> { "execute": "query-dump-guest-memory-capability" } <- { "return": { "format-option": "optional",

[Qemu-devel] [PATCH v8 02/13] dump: add argument to write_elfxx_notes

2014-01-27 Thread qiaonuohan
write_elf32_notes/wirte_elf64_notes use fd_write_vmcore to write elf notes to vmcore. Adding parameter "WriteCoreDumpFunction f" makes it available to choose the method of writing elf notes Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dump.c | 16 1 files changed,

[Qemu-devel] [PATCH v8 06/13] dump: add support for lzo/snappy

2014-01-27 Thread qiaonuohan
kdump-compressed format supports three compression format, zlib/lzo/snappy. Currently, only zlib is available. This patch is used to support lzo/snappy. '--enable-lzo/--enable-snappy' is needed to be specified with configure to make lzo/snappy available for qemu Signed-off-by: Qiao Nuohan Reviewe

[Qemu-devel] [PATCH v8 03/13] dump: add API to write header of flatten format

2014-01-27 Thread qiaonuohan
flatten format will be used when writing kdump-compressed format. The format is also used by makedumpfile, you can refer to the following URL to get more detailed information about flatten format of kdump-compressed format: http://sourceforge.net/projects/makedumpfile/ The two functions here are u

[Qemu-devel] [PATCH 00/13 v7] Make 'dump-guest-memory' dump in kdump-compressed format

2014-01-17 Thread qiaonuohan
ss Andreas's comments about coding style Changes from v3 to v4: 1. change to avoid conflict with Andreas's patches 2. rebase Changes from v2 to v3: 1. Address Eric's comment Changes from v1 to v2: 1. Address Eric & Daniel's comment: fix manner of string copy. 2. Address Eric

[Qemu-devel] [PATCH 09/13 v7] dump: add API to write dump_bitmap

2014-01-17 Thread qiaonuohan
functions are used to write 1st and 2nd dump_bitmap of kdump-compressed format, which is used to indicate whether the corresponded page is existed in vmcore. 1st and 2nd dump_bitmap are same, because dump level is specified to 1 here. Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dum

[Qemu-devel] [PATCH 11/13 v7] dump: add API to write dump pages

2014-01-17 Thread qiaonuohan
functions are used to write page to vmcore. vmcore is written page by page. page desc is used to store the information of a page, including a page's size, offset, compression format, etc. Signed-off-by: Qiao Nuohan --- dump.c| 229

[Qemu-devel] [PATCH 10/13 v7] dump: add APIs to operate DataCache

2014-01-17 Thread qiaonuohan
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 Reviewed-by: Laszlo Ersek --- dump.c| 47 +++

[Qemu-devel] [PATCH 04/13 v7] dump: add API to write vmcore

2014-01-16 Thread qiaonuohan
Function is used to write vmcore in flatten format. In flatten format, data is written block by block, and in front of each block, a struct MakedumpfileDataHeader is stored there to indicate the offset and size of the data block. struct MakedumpfileDataHeader { int64_t offset; int64_t buf_

[Qemu-devel] [PATCH 12/13 v7] dump: make kdump-compressed format available for 'dump-guest-memory'

2014-01-16 Thread qiaonuohan
Make monitor command 'dump-guest-memory' be able to dump in kdump-compressed format. The command's usage: dump [-p] protocol [begin] [length] [format] 'format' is used to specified the format of vmcore and can be: 1. 'elf': ELF format, without compression 2. 'kdump-zlib': kdump-compressed forma

[Qemu-devel] [PATCH 08/13 v7] dump: add API to write dump header

2014-01-16 Thread qiaonuohan
the functions are used to write header of kdump-compressed format to vmcore. Header of kdump-compressed format includes: 1. common header: DiskDumpHeader32 / DiskDumpHeader64 2. sub header: KdumpSubHeader32 / KdumpSubHeader64 3. extra information: only elf notes here Signed-off-by: Qiao Nuohan Re

[Qemu-devel] [PATCH 02/13 v7] dump: add argument to write_elfxx_notes

2014-01-16 Thread qiaonuohan
write_elf32_notes/wirte_elf64_notes use fd_write_vmcore to write elf notes to vmcore. Adding parameter "WriteCoreDumpFunction f" makes it available to choose the method of writing elf notes Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- dump.c | 16 1 files changed,

[Qemu-devel] [PATCH 03/13 v7] dump: add API to write header of flatten format

2014-01-16 Thread qiaonuohan
flatten format will be used when writing kdump-compressed format. The format is also used by makedumpfile, you can refer to the following URL to get more detailed information about flatten format of kdump-compressed format: http://sourceforge.net/projects/makedumpfile/ The two functions here are u

[Qemu-devel] [PATCH 13/13 v7] dump: add 'query-dump-guest-memory-capability' command

2014-01-16 Thread qiaonuohan
'query-dump-guest-memory-capability' is used to query whether option 'format' is available for 'dump-guest-memory' and the available format. The output of the command will be like: -> { "execute": "query-dump-guest-memory-capability" } <- { "return": { "format-option": "optional",

[Qemu-devel] [PATCH 05/13 v7] dump: add API to write elf notes to buffer

2014-01-16 Thread qiaonuohan
the function can be used by write_elf32_notes/write_elf64_notes to write notes to a buffer. If fd_write_vmcore is used, write_elf32_notes/write_elf64_notes will write elf notes to vmcore directly. Instead, if buf_write_note is used, elf notes will be written to opaque->note_buf at first. Signed-of

[Qemu-devel] [PATCH 07/13 v7] dump: add members to DumpState and init some of them

2014-01-16 Thread qiaonuohan
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 --- dump.c| 30 ++ include/sysemu/dump.h |7 +++ 2 files

[Qemu-devel] [PATCH 06/13 v7] dump: add support for lzo/snappy

2014-01-16 Thread qiaonuohan
kdump-compressed format supports three compression format, zlib/lzo/snappy. Currently, only zlib is available. This patch is used to support lzo/snappy. '--enable-lzo/--enable-snappy' is needed to be specified with configure to make lzo/snappy available for qemu Signed-off-by: Qiao Nuohan Reviewe

[Qemu-devel] [PATCH 01/13 v7] dump: const-qualify the buf of WriteCoreDumpFunction

2014-01-16 Thread qiaonuohan
WriteCoreDumpFunction is a function pointer that points to the function used to write content in "buf" into core file, so "buf" should be const-qualify. Signed-off-by: Qiao Nuohan --- dump.c|2 +- include/qom/cpu.h |3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) dif

[Qemu-devel] [PATCH v4 6/9] dump: Add API to create page

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Functions in this patch are used to gather data of page desc and page data in kdump-compressed format. The following patch will use these functions to gather data of page, then cache them into tmp files Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c

[Qemu-devel] [PATCH v4 9/9] dump: Make kdump-compressed format available for 'dump-guest-memory'

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Make monitor command 'dump-guest-memory' be able to dump in kdump-compressed format. The command's usage: dump [-p] protocol [begin] [length] [format] 'format' is used to specified the format of vmcore and can be: 1. 'elf': ELF format, without compression 2. 'zlib': kdump-co

[Qemu-devel] [PATCH v4 4/9] dump: Add API to create header of vmcore

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Functions in this patch are used to gather data of header and sub header in kdump-compressed format. The following patch will use these functions to gather data of header, then cache them into struct DumpState. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c

[Qemu-devel] [PATCH v4 2/9] dump: Add API to manipulate cache_data

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Struct cache_data is associated with a tmp file which is used to store page desc and page data in kdump-compressed format temporarily. The following patch will use these function to gather data of page and cache them in tmp files. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang

[Qemu-devel] [PATCH v4 7/9] dump: Add API to free memory used by creating header, bitmap and page

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan When calling create_header, create_dump_bitmap and create_pages, some memory spaces are allocated. The following patch will use this function to free these memory. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c | 19 +++ 1 files changed, 19

[Qemu-devel] [PATCH v4 8/9] dump: Add API to write header, bitmap and page into vmcore

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan The following patch will use these functions to write cached data into vmcore. Header is cached in DumpState, and bitmap and page are cached in tmp files. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c | 259 +++

[Qemu-devel] [PATCH v4 5/9] dump: Add API to create data of dump bitmap

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Functions in this patch are used to gather data of 1st and 2nd dump bitmap in kdump-compressed format. The following patch will use these functions to gather data of dump bitmap, then cache them into tmp files. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c

[Qemu-devel] [PATCH v4 3/9] dump: Move struct definition into dump_memroy.h

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Move definition of struct DumpState into include/sysemu/dump_memory.h. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c | 22 +- include/sysemu/dump_memory.h | 40 2 files c

[Qemu-devel] [PATCH v4 1/9] dump: Add API to manipulate dump_bitmap

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Struct dump_bitmap is associated with a tmp file which is used to store bitmap in kdump-compressed format temporarily. The following patch will use these functions to gather data of bitmap and cache them into tmp files. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe ---

[Qemu-devel] [PATCH v4 0/9] Make 'dump-guest-memory' dump in kdump-compressed format

2013-05-27 Thread qiaonuohan
From: Qiao Nuohan Hi, all The last version is here: http://lists.gnu.org/archive/html/qemu-devel/2013-05/msg02280.html 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-d

[Qemu-devel] [PATCH] Remove twice include of qemu-common.h

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan This patch is used to remove twice include of "qemu-common.h" in block/win32-aio.c Signed-off-by: Qiao Nuohan --- block/win32-aio.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/win32-aio.c b/block/win32-aio.c index 5d0fbbf..fcb7c75 100644 ---

[Qemu-devel] [PATCH 7/9 v2] Add API to free buf used by creating header, bitmap and page

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan When calling create_header, create_dump_bitmap and create_pages, some memory spaces are allocated. The following patch will use this function to free these spaces. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c | 19 +++ 1 files changed, 1

[Qemu-devel] [PATCH 4/9 v2] Add API to create header of vmcore

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Add API to create header, sub header of vmcore in kdump-compressed format. The data is store in struct DumpState. The following patch will use this function to gather data of header, then write them into vmcore. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.

[Qemu-devel] [PATCH 5/9 v2] Add API to create data of dump bitmap

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Add API to get data of the 1st and 2nd dump bitmap and save them into tmp files. The following patch will use these functions to gather data of dump bitmap, then write them into vmcore. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c| 98 +++

[Qemu-devel] [PATCH 9/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Make monitor command 'dump-guest-memory' dump in kdump-compressed format. The command's usage: dump [-p] protocol [begin] [length] [format] 'format' is used to specified the format of vmcore and can be: 1. 'elf': ELF format, without compression 2. 'zlib': kdump-compressed form

[Qemu-devel] [PATCH 8/9 v2] Add API to write header, bitmap and page into vmcore

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan The following patch will use these functions to write cached data into vmcore. Header is cached in DumpState, and bitmap and page are cached in tmp files. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c| 259 ++

[Qemu-devel] [PATCH 6/9 v2] Add API to create page

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Add API to get data of page desc and page data and save them into tmp files. The following patch will use these functions to gather data of page desc and page data, then write them into vmcore Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c|

[Qemu-devel] [PATCH 1/9 v2] Add API to manipulate dump_bitmap

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Struct dump_bitmap is associated with a tmp file, and the tmp file can be used to save data of bitmap in kdump-compressed format temporarily. The following patch will use these functions to get the data of bitmap and cache them into tmp files. Signed-off-by: Qiao Nuohan Review

[Qemu-devel] [PATCH 3/9 v2] Move includes and struct definition to dump.h

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Move includes and definition of struct DumpState into include/sysemu/dump.h. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c| 29 - include/sysemu/dump.h | 30 ++ 2 files changed, 30

[Qemu-devel] [PATCH 2/9 v2] Add API to manipulate cache_data

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Struct dump_bitmap is associated with a tmp file, and the tmp file can be used to save data of page desc and page data in kdump-compressed format temporarily. The following patch will use these function to get the data of page desc and page data and cache them in tmp files. Sig

[Qemu-devel] [PATCH 0/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format

2013-05-12 Thread qiaonuohan
From: Qiao Nuohan Hi, all The last version is here: http://lists.gnu.org/archive/html/qemu-devel/2013-05/msg00803.html 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-d

Re: [Qemu-devel] [PATCH 0/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format

2013-05-12 Thread qiaonuohan
Sorry, the cc list is wrong, I will resend the mails. > -Original Message- > From: qiaonuo...@cn.fujitsu.com [mailto:qiaonuo...@cn.fujitsu.com] > Sent: Wednesday, May 08, 2013 9:54 AM > To: qemu-devel@nongnu.org > Cc: > ebl...@redhat.com.berra...@redhat.com.afaer...@suse.de.d.hatayama@jp.fu

Re: [Qemu-devel] [PATCH 9/9] Make monitor command 'dump-guest-memory' dump in kdump-compressed format

2013-05-08 Thread qiaonuohan
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Wednesday, May 08, 2013 1:13 AM > To: Qiao Nuohan > Cc: qemu-devel@nongnu.org; Zhang Xiaohe > Subject: Re: [Qemu-devel] [PATCH 9/9] Make monitor command 'dump-guest-memory' > dump in kdump-compressed format > > > >

Re: [Qemu-devel] [PATCH 1/9] Add API to manipulate dump_bitmap

2013-05-08 Thread qiaonuohan
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Wednesday, May 08, 2013 12:14 AM > To: Qiao Nuohan > Cc: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH 1/9] Add API to manipulate dump_bitmap > > On 05/07/2013 01:16 AM, Qiao Nuohan wrote: > > Struct dump