All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wen Congyang <wency@cn.fujitsu.com>
To: Dave Anderson <anderson@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Richard W.M. Jones" <rjones@redhat.com>,
	Avi Kivity <avi@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [Qemu-devel] [Question] dump memory when host pci device is used by guest
Date: Tue, 25 Oct 2011 09:37:08 +0800	[thread overview]
Message-ID: <4EA612C4.40409@cn.fujitsu.com> (raw)
In-Reply-To: <ae47d347-e8c1-401c-b5e0-3e90ec19fc46@zmail05.collab.prod.int.phx2.redhat.com>

At 10/24/2011 11:58 PM, Dave Anderson Write:
> 
> 
> ----- Original Message -----
> 
>>>> No, an ELF image of the guest's physical memory.
>>>
>>> Well then that should be pretty straight forward to support.  Depending upon
>>> how similar it would be to the "standard" kdump ELF format, the only other
>>> issue is how to determine the physical base address at which the kernel is
>>> loaded, in order to be able to translate the mapped kernel-text/static-data
>>> virtual region of the x86_64 arch (the __START_KERNEL_map region).
>>>
>>
>> I guess an elf note would work for that?
> 
> Right -- here is an example of a RHEL6 ELF kdump header:

Hi, Jan
Is gdb standard core file like the following format? Does gdb support this
format?

If yes, I think the dump command can output the guest physical memory in
the following format, and we can use both gdb and crash to analyze it.

> 
> $ readelf -a vmcore
> ELF Header:
>   Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
>   Class:                             ELF64
>   Data:                              2's complement, little endian
>   Version:                           1 (current)
>   OS/ABI:                            UNIX - System V
>   ABI Version:                       0
>   Type:                              CORE (Core file)
>   Machine:                           Advanced Micro Devices X86-64
>   Version:                           0x1
>   Entry point address:               0x0
>   Start of program headers:          64 (bytes into file)
>   Start of section headers:          0 (bytes into file)
>   Flags:                             0x0
>   Size of this header:               64 (bytes)
>   Size of program headers:           56 (bytes)
>   Number of program headers:         6
>   Size of section headers:           0 (bytes)
>   Number of section headers:         0
>   Section header string table index: 0
> 
> There are no sections in this file.
> 
> There are no sections in this file.
> 
> Program Headers:
>   Type           Offset             VirtAddr           PhysAddr
>                  FileSiz            MemSiz              Flags  Align
>   NOTE           0x0000000000000190 0x0000000000000000 0x0000000000000000
>                  0x000000000000083c 0x000000000000083c         0
>   LOAD           0x00000000000009cc 0xffffffff81000000 0x0000000001000000
>                  0x0000000000ba3000 0x0000000000ba3000  RWE    0
>   LOAD           0x0000000000ba39cc 0xffff810000000000 0x0000000000000000
>                  0x00000000000a0000 0x00000000000a0000  RWE    0
>   LOAD           0x0000000000c439cc 0xffff810000100000 0x0000000000100000
>                  0x0000000001f00000 0x0000000001f00000  RWE    0
>   LOAD           0x0000000002b439cc 0xffff81000a000000 0x000000000a000000
>                  0x00000000c5fc2840 0x00000000c5fc2840  RWE    0
>   LOAD           0x00000000c8b0620c 0xffff810100000000 0x0000000100000000
>                  0x0000000030000000 0x0000000030000000  RWE    0
> 
> There is no dynamic section in this file.
> 
> There are no relocations in this file.
> 
> There are no unwind sections in this file.
> 
> No version information found in this file.
> 
> Notes at offset 0x00000190 with length 0x0000083c:
>   Owner         Data size       Description
>   CORE          0x00000150      NT_PRSTATUS (prstatus structure)
>   CORE          0x00000150      NT_PRSTATUS (prstatus structure)
>   VMCOREINFO            0x0000055b      Unknown note type: (0x00000000)
> $
> 
> In this example, the phys_base (of zero) can be determined by looking 
> at the first PT_LOAD segment, and comparing the PhysAddr and the VirtAddr
> values -- given that __START_KERNEL_map region is based at ffffffff800000000.
> The remaining physical memory chunks are described by the subsequent 
> unity-mapped segments.
> 
> The NT_PRSTATUS notes are register dumps of each cpu, where this vmcore
> was from a 2-cpu system.  But the crash utility is capable of surviving
> without them.  It can also get by without the VMCOREINFO note, which is
> primarily there for use by the "makedumpfile" utility, which is used to
> compress ELF kdumps and filter out unwanted pages, and then make a different 
> dumpfile format entirely.
> 
> This may be another stupid question -- but does the guest failure mode
> render it incapable of using kdump?

Guest failure mode? I do not what does it mean. But 'virsh dump' can be used
when kdump fails or kdump service is not started.

Thanks
Wen Congyang

> 
> Dave
> 
> 

  reply	other threads:[~2011-10-25  1:35 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07  9:46 [Qemu-devel] [Question] dump memory when host pci device is used by guest Wen Congyang
2011-10-07 10:16 ` Jan Kiszka
2011-10-07 12:25   ` Wen Congyang
2011-10-07 12:56     ` Jan Kiszka
2011-10-07 14:05       ` Wen Congyang
2011-10-07 15:06         ` Jan Kiszka
2011-10-10  9:00       ` Daniel P. Berrange
2011-10-08 15:16   ` Richard W.M. Jones
2011-10-09  8:49     ` Jan Kiszka
2011-10-09 10:23       ` Richard W.M. Jones
2011-10-09 10:26         ` Jan Kiszka
2011-10-10  2:21         ` Wen Congyang
2011-10-10  6:52           ` Jan Kiszka
2011-10-10  6:59             ` Wen Congyang
2011-10-10  7:01               ` Jan Kiszka
2011-10-10  7:17                 ` Wen Congyang
2011-10-10  7:22                   ` Jan Kiszka
2011-10-10  7:47                     ` Wen Congyang
2011-10-10  7:48                       ` Jan Kiszka
2011-10-10  8:28                         ` Wen Congyang
2011-10-10  7:08             ` Alexander Graf
2011-10-10  7:10               ` Jan Kiszka
2011-10-10  9:02             ` Daniel P. Berrange
2011-10-10  9:34               ` Jan Kiszka
2011-10-11  2:27                 ` Wen Congyang
2011-10-18  7:15                 ` Wen Congyang
2011-10-18  7:52                   ` Jan Kiszka
2011-10-18  7:58                     ` Wen Congyang
2011-10-18  8:19                       ` Jan Kiszka
2011-10-18  8:25                         ` Wen Congyang
2011-10-18  8:26                           ` Jan Kiszka
2011-10-18  8:31                             ` Wen Congyang
2011-10-18  8:31                               ` Jan Kiszka
2011-10-18  8:34                                 ` Richard W.M. Jones
2011-10-18  8:36                                   ` Jan Kiszka
2011-10-18  8:39                                     ` Jan Kiszka
2011-10-18 10:41                                       ` Paolo Bonzini
2011-10-18 10:42                                         ` Christoph Hellwig
2011-10-18 12:47                                           ` Jan Kiszka
2011-10-18 13:08                                             ` Christoph Hellwig
2011-10-18 13:13                                               ` Jan Kiszka
2011-10-18 10:47                                         ` Jan Kiszka
2011-10-18 13:30                                           ` Richard W.M. Jones
2011-10-18 13:34                                             ` Jan Kiszka
2011-10-18  9:43                                     ` Wen Congyang
2011-10-18 10:28                                       ` Jan Kiszka
2011-10-18 13:51                                         ` Wen Congyang
2011-10-18 13:55                                           ` Jan Kiszka
2011-10-18 14:17                                             ` Wen Congyang
2011-10-18 14:21                                               ` Jan Kiszka
2011-10-18 15:04                                                 ` Wen Congyang
2011-10-18 15:27                                                   ` Jan Kiszka
2011-10-19  1:23                                                     ` Wen Congyang
2011-10-19  2:04                                 ` KAMEZAWA Hiroyuki
2011-10-19 11:40                                   ` Jan Kiszka
2011-10-20  1:22                                     ` Wen Congyang
2011-10-20  9:41                                       ` Jan Kiszka
2011-10-20 10:03                                         ` Wen Congyang
2011-10-21  7:11                                           ` Jan Kiszka
2011-10-21  7:50                                             ` Wen Congyang
2011-10-21 13:02                                               ` Dave Anderson
2011-10-21 13:16                                                 ` Jan Kiszka
2011-10-21 14:12                                                 ` Richard W.M. Jones
2011-10-24  2:25                                                 ` Wen Congyang
2011-10-24 14:25                                                   ` Dave Anderson
2011-10-24 15:01                                                     ` Avi Kivity
2011-10-24 15:25                                                       ` Dave Anderson
2011-10-24 15:30                                                         ` Avi Kivity
2011-10-24 15:58                                                           ` Dave Anderson
2011-10-25  1:37                                                             ` Wen Congyang [this message]
2011-10-25  7:37                                                               ` Jan Kiszka
2011-10-25  8:06                                                           ` Wen Congyang
2011-10-25  8:23                                                             ` Avi Kivity
2011-10-25  8:35                                                               ` Paolo Bonzini
2011-10-25  8:52                                                                 ` Avi Kivity
2011-10-25  8:56                                                                   ` Paolo Bonzini
2011-10-25  9:19                                                                     ` Jan Kiszka
2011-10-25 13:18                                                                 ` Dave Anderson
2011-10-25 13:22                                                                   ` Avi Kivity
2011-10-18  7:58                   ` Daniel P. Berrange
2011-10-18  8:17                     ` Jan Kiszka
2011-10-18  8:25                       ` Jan Kiszka
2011-10-18  8:25                       ` Daniel P. Berrange
2011-10-18  8:30                         ` Jan Kiszka
2011-10-10  9:08           ` Daniel P. Berrange
2011-10-10  9:10             ` Daniel P. Berrange
2011-10-10  9:34               ` Richard W.M. Jones
2011-10-10 10:17                 ` Jan Kiszka
2011-10-10  9:34               ` Jan Kiszka
2011-10-10 10:19                 ` Daniel P. Berrange
2011-10-11  2:20                   ` Wen Congyang
2011-10-11  6:58                     ` Jan Kiszka
2011-10-11  7:13                       ` Wen Congyang
2011-10-10 10:21                 ` Alon Levy
2011-10-10 10:48                   ` Paolo Bonzini
2011-10-10 11:04                     ` Daniel P. Berrange
2011-10-10 11:09                       ` Paolo Bonzini
2011-10-10 12:00                         ` [Qemu-devel] windows crash dump header. was: " Alon Levy
2011-10-10 12:38                           ` Paolo Bonzini
2011-10-10 13:47                             ` Alon Levy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EA612C4.40409@cn.fujitsu.com \
    --to=wency@cn.fujitsu.com \
    --cc=anderson@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.