mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
dump: add Windows dump format to dump-guest-memory
This patch adds Windows crashdumping feature. Now QEMU can produce ELF-dump containing Windows crashdump header, which can help to convert to a valid WinDbg-understandable crashdump file, or immediately create such file. The crashdump will be obtained by joining physical memory dump and 8K header exposed through vmcoreinfo/fw_cfg device by guest driver at BSOD time. Option '-w' was added to dump-guest-memory command. At the moment, only x64 configuration is supported. Suitable driver can be found at https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/fwcfg64 Signed-off-by: Viktor Prutyanov <viktor.prutyanov@virtuozzo.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180517162342.4330-2-viktor.prutyanov@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
2266d44311
commit
2da91b54fe
7 changed files with 339 additions and 9 deletions
9
hmp.c
9
hmp.c
|
@ -2014,6 +2014,7 @@ void hmp_device_del(Monitor *mon, const QDict *qdict)
|
|||
void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
Error *err = NULL;
|
||||
bool win_dmp = qdict_get_try_bool(qdict, "windmp", false);
|
||||
bool paging = qdict_get_try_bool(qdict, "paging", false);
|
||||
bool zlib = qdict_get_try_bool(qdict, "zlib", false);
|
||||
bool lzo = qdict_get_try_bool(qdict, "lzo", false);
|
||||
|
@ -2028,12 +2029,16 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict)
|
|||
enum DumpGuestMemoryFormat dump_format = DUMP_GUEST_MEMORY_FORMAT_ELF;
|
||||
char *prot;
|
||||
|
||||
if (zlib + lzo + snappy > 1) {
|
||||
error_setg(&err, "only one of '-z|-l|-s' can be set");
|
||||
if (zlib + lzo + snappy + win_dmp > 1) {
|
||||
error_setg(&err, "only one of '-z|-l|-s|-w' can be set");
|
||||
hmp_handle_error(mon, &err);
|
||||
return;
|
||||
}
|
||||
|
||||
if (win_dmp) {
|
||||
dump_format = DUMP_GUEST_MEMORY_FORMAT_WIN_DMP;
|
||||
}
|
||||
|
||||
if (zlib) {
|
||||
dump_format = DUMP_GUEST_MEMORY_FORMAT_KDUMP_ZLIB;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue