From: Christopher Covington <cov@codeaurora.org>
To: Piyawath Boukom <boukom.p.aa@m.titech.ac.jp>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Asking about QEMU's process in memory address space of host
Date: Thu, 09 Jul 2015 13:55:18 -0400 [thread overview]
Message-ID: <559EB586.8080404@codeaurora.org> (raw)
In-Reply-To: <0B614E46-FA7E-4236-8204-810D37D76A0B@m.titech.ac.jp>
On 07/08/2015 07:14 AM, Piyawath Boukom wrote:
> Dear peoples in mailing-list,
>
> My name is Piyawath Boukom, I’m a student from Tokyo Tech.
> I hope you can enlighten me about this.
>
> Below are things that those I would like to perform.
>
> - I want to identify where guest kernel lives in QEMU’s process on host machine, is it possible to find a set of logical address space of guest kernel on host machine ? (which part of memory space is being used by guest kernel)
>
> - If I can specify where QEMU’s process lives in host memory address space then I know where stack, heap, data, text, etc. of QEMU live. So, can I determine where guest machine’s physical memory lives ? (in host logical address)
>
> - If above are possible to do, can I write those things into a file ? (ex. data in guest machine’s memory, binary data, etc.)
>
> *Host and guest are Linux.
The "savevm" monitor command dumps pretty much all the state to a file,
although you have to use QCOW2 format disk images.
https://en.wikibooks.org/wiki/QEMU/Monitor#savevm
Once the snapshot/checkpoint has been saved, you can dig into it to get
specific memory contents. You'll have to write your own scripts for this as
far as I know.
For kernel virtual addresses, check the guest's dmesg. `dmesg | sed -nr
'/Virtual kernel memory/,/\[/ p'` does that for me on AArch64.
If there's a particular user space process you're interested in, run `cat
/proc/$PID/maps` in the guest immediately before or after saving the
checkpoint to get its virtual addresses.
Chris
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2015-07-09 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 11:14 [Qemu-devel] Asking about QEMU's process in memory address space of host Piyawath Boukom
2015-07-09 17:55 ` Christopher Covington [this message]
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=559EB586.8080404@codeaurora.org \
--to=cov@codeaurora.org \
--cc=boukom.p.aa@m.titech.ac.jp \
--cc=qemu-devel@nongnu.org \
/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.