History | View | Annotate | Download (51.8 kB)
dump: add members to DumpState and init some of them
add some members to DumpState that will be used in writing vmcore inkdump-compressed format. some of them, like page_size, will be initializedin the patch.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>...
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 / DiskDumpHeader642. sub header: KdumpSubHeader32 / KdumpSubHeader64...
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....
dump: add APIs to operate DataCache
DataCache is used to store data temporarily, then the data will be written tovmcore. These functions will be called later when writing data of page tovmcore.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
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.
dump: make kdump-compressed format available for 'dump-guest-memory'
Make monitor command 'dump-guest-memory' be able to dump in kdump-compressedformat. The command's usage:
dump [-p] protocol [begin] [length] [format]
'format' is used to specified the format of vmcore and can be:...
Define the architecture for compressed dump format
Signed-off-by: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
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":...
dump: const-qualify the buf of WriteCoreDumpFunction
WriteCoreDumpFunction is a function pointer that points to the function used towrite content in "buf" into core file, so "buf" should be const-qualify.
dump: add argument to write_elfxx_notes
write_elf32_notes/wirte_elf64_notes use fd_write_vmcore to write elf notes tovmcore. Adding parameter "WriteCoreDumpFunction f" makes it available to choosethe method of writing elf notes
dump: add API to write header of flatten format
flatten format will be used when writing kdump-compressed format. The format isalso used by makedumpfile, you can refer to the following URL to get moredetailed information about flatten format of kdump-compressed format:...
dump: add API to write vmcore
Function is used to write vmcore in flatten format. In flatten format, data iswritten block by block, and in front of each block, a structMakedumpfileDataHeader is stored there to indicate the offset and size of thedata block....
dump: add API to write elf notes to buffer
the function can be used by write_elf32_notes/write_elf64_notes to write notesto a buffer. If fd_write_vmcore is used, write_elf32_notes/write_elf64_noteswill write elf notes to vmcore directly. Instead, if buf_write_note is used,...
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 <aneesh.kumar@linux.vnet.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthandmacros.
Signed-off-by: Andreas Färber <afaerber@suse.de>
dump: introduce GuestPhysBlockList
The vmcore must use physical addresses that are visible to the guest, notaddresses that point into linear RAMBlocks. As first step, introduce thelist type into which we'll collect the physical mappings in effect at the...
dump: populate guest_phys_blocks
While the machine is paused, in guest_phys_blocks_append() we register aone-shot MemoryListener, solely for the initial collection of the validguest-physical memory ranges that happens at listener registration time.
For each range that is reported to guest_phys_blocks_region_add(), we...
dump: rebase from host-private RAMBlock offsets to guest-physical addresses
RAMBlock.offset --> GuestPhysBlock.target_startRAMBlock.offset + RAMBlock.length --> GuestPhysBlock.target_endRAMBlock.length --> GuestPhysBlock.target_end -...
dump: clamp guest-provided mapping lengths to ramblock sizes
Even a trusted & clean-state guest can map more memory than what it wasgiven. Since the vmcore contains RAMBlocks, mapping sizes should beclamped to RAMBlock sizes. Otherwise such oversized mappings can exceed...
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 <pbonzini@redhat.com>...
dump: qmp_dump_guest_memory(): use error_setg_file_open()
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Acked-by: Kevin Wolf <kwolf@redhat.com>
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 fora NULL CPUClass::get_memory_mapping field....
dump: Abstract dump_init() with cpu_synchronize_all_states()
Instead of calling cpu_synchronize_state() for each CPU, call theexisting cpu_synchronize_all_states() helper.
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move cpu_write_elfXX_note() functions to CPUState
Convert cpu_write_elfXX_note() functions to CPUClass methods and passCPUState as argument. Update target-i386 accordingly.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>[AF: Retain stubs as CPUClass' default method implementation; style changes]...
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 <pbonzini@redhat.com>
cpu: Move host_tid field to CPUState
Change gdbstub's cpu_index() argument to CPUState now that CPUArchStateis no longer used.
exec: change RAM list to a TAILQ
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>
softmmu: move include files to include/sysemu/
monitor: move include files to include/monitor/
qapi: move include files to include/qobject/
exec: move include files to include/exec/
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
qmp: dump-guest-memory: don't spin if non-blocking fd would block
fd_write_vmcore() will indefinitely spin for a non-blockingfile-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....
monitor: add Error * argument to monitor_get_fd
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
dump: Fix license version (GPL2+ instead of GPL2)
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
w32: Fix broken build (missing include file)
dump.c was recently added to the code. It unconditionallyincludes 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....
dump: remove dumping stuff from cpu-all.h
This simplifies things, because they will only be included for softmmutargets and because the stubs are taken out-of-line in separate files,which in the future could even be compiled only once.
dump: change cpu_get_note_size to return ssize_t
So that it can use the same prototype in both cases.
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...