[Crash-utility] [PATCH] add support to "virsh dump-guest-memory"(qemu memory dump)

HATAYAMA Daisuke d.hatayama at jp.fujitsu.com
Fri Jul 20 08:43:42 UTC 2012


From: qiaonuohan <qiaonuohan at cn.fujitsu.com>
Subject: [Crash-utility] [PATCH] add support to "virsh dump-guest-memory"(qemu memory dump)
Date: Fri, 20 Jul 2012 14:25:58 +0800

> Hello Dave,
> 
> I made this patch to make crash can analyze core dump file created by
> "virsh dump-guest-memory"(I will call it "qemu memory dump" below). In
> my test(guest OS: RHEL6.2 x86 & x86_64), the patch works well with
> dump
> files created by "qemu memory dump".
> 
> However, after some investigation, I think I need to discuss further
> works with you.
> 
> The core dump created by qemu memory dump is similar to kdump. The
> distinctness only focuses on note sections. The former one gets
> note sections with a name called "QEMU".
> 
> 1. Some registers' information stored in "CORE" note sections, needed
> by crash, also stores in "QEMU" note sections. I think it's not
> reasonable to replace them. What do you think?
> 
> 2. Other registers which are only stored in "QEMU" note sections are
> not directly used in crash. I will continue investigating the use of
> these registers. And if you give some suggestion, it will be helpful.
> 

qemu memory dump can be triggered when guest machine is in the kdump
2nd kernel. kdump moves the first 640kB in the reserved area, so then
in order to show users the 1st kernel's view, crash needs to interpret
read requests to the first 640kB properly. See sadump implementation,
which does this so seems helpful.

I also think it useful if we can see dump image from the 2nd kernel's
view. Because we can pass phys_base value via command-line, this
amounts to how to calculate phys_base for the 2nd kernel, and this
needs some meaningful 2nd kernel's address that points at
straight-mapping region, and this is IDT value, which is also included
in QEMU values.

Even if there's no commands that explicitly use QEMU values, it's
useful at least to be able to dump them. Users that know what each
value means can take advantage of them in some senses; at least IDT
value is needed in the above case. Though I don't know the best place
to add the feature. help -D is natural?

Thanks.
HATAYAMA, Daisuke




More information about the Crash-utility mailing list