Statistics
| Branch: | Revision:

root / dump.c @ feature-archipelago

History | View | Annotate | Download (51.8 kB)

# Date Author Comment
7aad248d 02/28/2014 06:52 pm qiaonuohan

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 <>...

298f1168 02/28/2014 06:52 pm qiaonuohan

dump: add API to write dump header

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...

d0686c72 02/28/2014 06:52 pm qiaonuohan

dump: add API to write dump_bitmap

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....

64cfba6a 02/28/2014 06:52 pm qiaonuohan

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 <>
Reviewed-by: Laszlo Ersek <>...

d12f57ec 02/28/2014 06:52 pm qiaonuohan

dump: add API to write dump pages

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 <>...

b53ccc30 02/28/2014 06:52 pm qiaonuohan

dump: make kdump-compressed format available for 'dump-guest-memory'

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:...

4ab23a91 02/28/2014 06:52 pm qiaonuohan

Define the architecture for compressed dump format

Signed-off-by: Ekaterina Tumanova <>
Reviewed-by: Laszlo Ersek <>
Reviewed-by: Qiao Nuohan <>
Signed-off-by: Luiz Capitulino <>

7d6dc7f3 02/28/2014 06:52 pm qiaonuohan

dump: add 'query-dump-guest-memory-capability' command

'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":...

b5ba1cc6 02/28/2014 06:49 pm qiaonuohan

dump: const-qualify the buf of WriteCoreDumpFunction

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 <>...

6a519918 02/28/2014 06:49 pm qiaonuohan

dump: add argument to write_elfxx_notes

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 <>...

fda05387 02/28/2014 06:49 pm qiaonuohan

dump: add API to write header of flatten format

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:...

5d31babe 02/28/2014 06:49 pm qiaonuohan

dump: add API to write vmcore

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....

4835ef77 02/28/2014 06:49 pm qiaonuohan

dump: add API to write elf notes to buffer

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,...

bb6b6843 10/26/2013 12:25 am Aneesh Kumar K.V

dump-guest-memory: Check for the correct return value

We should check for error with s->note_size

Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Alexander Graf <>

bdc44640 09/03/2013 01:25 pm Andreas Färber

cpu: Use QTAILQ for CPU list

Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand
macros.

Signed-off-by: Andreas Färber <>

5ee163e8 08/08/2013 06:01 pm Laszlo Ersek

dump: introduce GuestPhysBlockList

The vmcore must use physical addresses that are visible to the guest, not
addresses that point into linear RAMBlocks. As first step, introduce the
list type into which we'll collect the physical mappings in effect at the...

c5d7f60f 08/08/2013 06:01 pm Laszlo Ersek

dump: populate guest_phys_blocks

While the machine is paused, in guest_phys_blocks_append() we register a
one-shot MemoryListener, solely for the initial collection of the valid
guest-physical memory ranges that happens at listener registration time.

For each range that is reported to guest_phys_blocks_region_add(), we...

56c4bfb3 08/08/2013 06:01 pm Laszlo Ersek

dump: rebase from host-private RAMBlock offsets to guest-physical addresses

RAMBlock.offset --> GuestPhysBlock.target_start
RAMBlock.offset + RAMBlock.length --> GuestPhysBlock.target_end
RAMBlock.length --> GuestPhysBlock.target_end -...

2cac2607 08/08/2013 06:01 pm Laszlo Ersek

dump: clamp guest-provided mapping lengths to ramblock sizes

Even a trusted & clean-state guest can map more memory than what it was
given. Since the vmcore contains RAMBlocks, mapping sizes should be
clamped to RAMBlock sizes. Otherwise such oversized mappings can exceed...

182735ef 07/09/2013 10:32 pm Andreas Färber

cpu: Make first_cpu and next_cpu CPUState

Move next_cpu from CPU_COMMON to CPUState.
Move first_cpu variable to qom/cpu.h.

gdbstub needs to use CPUState::env_ptr for now.
cpu_copy() no longer needs to save and restore cpu_next.

Acked-by: Paolo Bonzini <>...

7581766b 06/17/2013 06:01 pm Luiz Capitulino

dump: qmp_dump_guest_memory(): use error_setg_file_open()

Signed-off-by: Luiz Capitulino <>
Acked-by: Kevin Wolf <>

11ed09cf 06/11/2013 08:38 pm Andreas Färber

memory_mapping: Improve qemu_get_guest_memory_mapping() error reporting

Pass any Error out into dump_init() and have it actually stop on errors.
Whether it is unsupported on a certain CPU can be checked by looking for
a NULL CPUClass::get_memory_mapping field....

1b3509ca 06/11/2013 08:01 pm Andreas Färber

dump: Abstract dump_init() with cpu_synchronize_all_states()

Instead of calling cpu_synchronize_state() for each CPU, call the
existing cpu_synchronize_all_states() helper.

Reviewed-by: Luiz Capitulino <>
Signed-off-by: Andreas Färber <>

c72bf468 05/01/2013 02:04 pm Jens Freimann

cpu: Move cpu_write_elfXX_note() functions to CPUState

Convert cpu_write_elfXX_note() functions to CPUClass methods and pass
CPUState as argument. Update target-i386 accordingly.

Signed-off-by: Jens Freimann <>
[AF: Retain stubs as CPUClass' default method implementation; style changes]...

0bc3cd62 04/15/2013 07:19 pm Paolo Bonzini

include: avoid useless includes of exec/ headers

Headers in include/exec/ are for the deepest innards of QEMU,
they should almost never be included directly.

Signed-off-by: Paolo Bonzini <>

0d34282f 02/16/2013 03:50 pm Andreas Färber

cpu: Move host_tid field to CPUState

Change gdbstub's cpu_index() argument to CPUState now that CPUArchState
is no longer used.

Signed-off-by: Andreas Färber <>

a3161038 12/21/2012 12:08 am Paolo Bonzini

exec: change RAM list to a TAILQ

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

2f61652d 09/27/2012 03:46 pm Luiz Capitulino

qmp: dump-guest-memory: don't spin if non-blocking fd would block

fd_write_vmcore() will indefinitely spin for a non-blocking
file-descriptor that would block. However, if the fd is non-blocking,
how does it make sense to spin?

Change this behavior to return an error instead....

a9940fc4 09/26/2012 06:42 pm Paolo Bonzini

monitor: add Error * argument to monitor_get_fd

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>

352666e2 06/11/2012 11:20 pm Stefan Weil

dump: Fix license version (GPL2+ instead of GPL2)

Signed-off-by: Stefan Weil <>
Signed-off-by: Wen Congyang <>

bbbc0e24 06/09/2012 01:41 pm Stefan Weil

w32: Fix broken build (missing include file)

dump.c was recently added to the code. It unconditionally
includes sys/procfs which is not available with MinGW (w32, w64).

It looks like this file is not needed at all (tested on Linux),
so I removed it completely....

5f86146f 06/07/2012 10:20 am Paolo Bonzini

dump: remove dumping stuff from cpu-all.h

This simplifies things, because they will only be included for softmmu
targets and because the stubs are taken out-of-line in separate files,
which in the future could even be compiled only once.

Signed-off-by: Paolo Bonzini <>

4720bd05 06/07/2012 10:19 am Paolo Bonzini

dump: change cpu_get_note_size to return ssize_t

So that it can use the same prototype in both cases.

Signed-off-by: Paolo Bonzini <>

783e9b48 06/04/2012 07:49 pm Wen Congyang

introduce a new monitor command 'dump-guest-memory' to dump guest's memory

The command's usage:
dump-guest-memory [-p] protocol [begin] [length]
The supported protocol can be file or fd:
1. file: the protocol starts with "file:", and the following string is...