From: Luiz Capitulino <lcapitulino@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 0/4] dump-guest-memory: correct the vmcores
Date: Tue, 30 Jul 2013 14:51:27 -0400 [thread overview]
Message-ID: <20130730145127.14247403@redhat.com> (raw)
In-Reply-To: <1375108636-17014-1-git-send-email-lersek@redhat.com>
On Mon, 29 Jul 2013 16:37:12 +0200
Laszlo Ersek <lersek@redhat.com> wrote:
> (Apologies for the long To: list, I'm including everyone who
> participated in
> <https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02607.html>).
>
> Conceptually, the dump-guest-memory command works as follows:
> (a) pause the guest,
> (b) get a snapshot of the guest's physical memory map, as provided by
> qemu,
> (c) retrieve the guest's virtual mappings, as seen by the guest (this is
> where paging=true vs. paging=false makes a difference),
> (d) filter (c) as requested by the QMP caller,
> (e) write ELF headers, keying off (b) -- the guest's physmap -- and (d)
> -- the filtered guest mappings.
> (f) dump RAM contents, keying off the same (b) and (d),
> (g) unpause the guest (if necessary).
>
> Patch #1 affects step (e); specifically, how (d) is matched against (b),
> when "paging" is "true", and the guest kernel maps more guest-physical
> RAM than it actually has.
>
> This can be done by non-malicious, clean-state guests (eg. a pristine
> RHEL-6.4 guest), and may cause libbfd errors due to PT_LOAD entries
> (coming directly from the guest page tables) exceeding the vmcore file's
> size.
>
> Patches #2 to #4 are independent of the "paging" option (or, more
> precisely, affect them equally); they affect (b). Currently input
> parameter (b), that is, the guest's physical memory map as provided by
> qemu, is implicitly represented by "ram_list.blocks". As a result, steps
> and outputs dependent on (b) will refer to qemu-internal offsets.
>
> Unfortunately, this breaks when the guest-visible physical addresses
> diverge from the qemu-internal, RAMBlock based representation. This can
> happen eg. for guests > 3.5 GB, due to the 32-bit PCI hole; see patch #4
> for a diagram.
>
> Patch #2 introduces input parameter (b) explicitly, as a reasonably
> minimal map of guest-physical address ranges. (Minimality is not a hard
> requirement here, it just decreases the number of PT_LOAD entries
> written to the vmcore header.) Patch #3 populates this map. Patch #4
> rebases the dump-guest-memory command to it, so that steps (e) and (f)
> work with guest-phys addresses.
>
> As a result, the "crash" utility can parse vmcores dumped for big x86_64
> guests (paging=false).
>
> Please refer to Red Hat Bugzilla 981582
> <https://bugzilla.redhat.com/show_bug.cgi?id=981582>.
>
> Disclaimer: as you can tell from my progress in the RHBZ, I'm new to the
> memory API. The way I'm using it might be retarded.
Series looks sane to me, but the important details go beyond my background
in this area, so I'd like an additional Reviewed-by before applying this
to the qmp-for-1.6 tree.
next prev parent reply other threads:[~2013-07-30 20:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 14:37 [Qemu-devel] [PATCH 0/4] dump-guest-memory: correct the vmcores Laszlo Ersek
2013-07-29 14:37 ` [Qemu-devel] [PATCH 1/4] dump: clamp guest-provided mapping lengths to ramblock sizes Laszlo Ersek
2013-07-29 14:37 ` [Qemu-devel] [PATCH 2/4] dump: introduce GuestPhysBlockList Laszlo Ersek
2013-07-29 14:37 ` [Qemu-devel] [PATCH 3/4] dump: populate guest_phys_blocks Laszlo Ersek
2013-07-29 14:37 ` [Qemu-devel] [PATCH 4/4] dump: rebase from host-private RAMBlock offsets to guest-physical addresses Laszlo Ersek
2013-07-29 21:08 ` [Qemu-devel] [PATCH 0/4] dump-guest-memory: correct the vmcores Luiz Capitulino
2013-07-29 21:53 ` Laszlo Ersek
2013-07-29 21:59 ` Laszlo Ersek
2013-07-30 18:51 ` Luiz Capitulino [this message]
2013-08-01 13:41 ` Luiz Capitulino
2013-08-01 14:31 ` Luiz Capitulino
2013-08-05 7:44 ` Laszlo Ersek
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=20130730145127.14247403@redhat.com \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).