qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mike Guidry <mike@unifieddefense.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] KVMonitor-like technology
Date: Tue, 1 Dec 2015 22:24:48 -0500	[thread overview]
Message-ID: <CANLmMVAFm0NrApgMyBHF_OLHPcFyWZzoyHQCZUHwkAwOQ2pfgA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

I have a project where I would like to inspect a QEMU Guest.  I came across
KVMonitor and really like some of the concepts.

I'd like to use shared memory/file backed memory to read guest memory
immediately using CR3 for Guest->Host memory address translation.

Has anyone has experience doing this?  I first changed qemu_try_memalign()
and realized that its for local memory allocations, usually.  I proceeded
to change other functions, and came across qemu_anon_ram_alloc() which
seemed to be where the larger (gigabyte) allocations were heading.  I
enabled prealloc and finally began getting the allocations I wanted...

I'm curious if anyone has any other suggestions than to use shm_open()
here.  I wanted to quickly hack this together and realized I cannot list
shared memory regions on OSX, so I dumped them to files.  My question is:
 I realize there is file-back for 'Large TLB,' although I didn't much
success converting that function for non-TLB based file systems.  I
considered doing mkramfs (with modified kernel for larger amounts, such as
larger shared memory is necessary), and putting the file system on top.  I
really haven't decided if I wanted to add another 'type' of backend, or to
quickly modify one of these.

 Am i missing some feature that may allow me to handle this quickly?  I
even considered using LD_PRELOAD to quickly hijack and enable all memory
under shared memory for reading guest VM memory from another process.  I
just have to ensure I have the CR3 context at all times of the particular
process I'd like to  read.

Thanks,
Mike

[-- Attachment #2: Type: text/html, Size: 1776 bytes --]

                 reply	other threads:[~2015-12-02  3:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CANLmMVAFm0NrApgMyBHF_OLHPcFyWZzoyHQCZUHwkAwOQ2pfgA@mail.gmail.com \
    --to=mike@unifieddefense.net \
    --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 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).