qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU Memory subsystem
@ 2013-06-21  1:51 Basim Baig
  2013-06-21  7:04 ` Wenchao Xia
  2013-06-21 16:16 ` Lluís Vilanova
  0 siblings, 2 replies; 5+ messages in thread
From: Basim Baig @ 2013-06-21  1:51 UTC (permalink / raw)
  To: qemu-devel

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

Hello,

I am currently working on a project where I aim to log every memory access
made by a virtual machine running inside of QEMU (for analyzing kernel
behavior). My initial approach is to possibly hook into the QEMU mmu
implementation and find the place where the guest->host page translation or
lookup is done. In this way I can know any pages accessed by the guest
(This is only the first level. Eventually I would want to get logging at
pointer granularity). I have been reading through the source code and
online documentations for a week now to get a general sense of the qemu
internals and codebase.

I just wanted some advice on what direction I should head to (or who I can
talk to) If I really want to get into depth of how I can make significant
changes to qemu memory management and mmu subsystem.

Thanks,
Mirza Basim Baig
Stony Brook University

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] QEMU Memory subsystem
  2013-06-21  1:51 [Qemu-devel] QEMU Memory subsystem Basim Baig
@ 2013-06-21  7:04 ` Wenchao Xia
  2013-06-21 16:16 ` Lluís Vilanova
  1 sibling, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2013-06-21  7:04 UTC (permalink / raw)
  To: Basim Baig; +Cc: qemu-devel

于 2013-6-21 9:51, Basim Baig 写道:
> Hello,
>
> I am currently working on a project where I aim to log every memory access
> made by a virtual machine running inside of QEMU (for analyzing kernel
> behavior). My initial approach is to possibly hook into the QEMU mmu
> implementation and find the place where the guest->host page translation or
> lookup is done. In this way I can know any pages accessed by the guest
> (This is only the first level. Eventually I would want to get logging at
> pointer granularity). I have been reading through the source code and
> online documentations for a week now to get a general sense of the qemu
> internals and codebase.
>
> I just wanted some advice on what direction I should head to (or who I can
> talk to) If I really want to get into depth of how I can make significant
> changes to qemu memory management and mmu subsystem.
>
> Thanks,
> Mirza Basim Baig
> Stony Brook University
>
   I think you can archieve your goal relative easily in soft-mmu mode,
but in KVM case, you will need to dig a bit in kvm.ko in kernel source
code.

-- 
Best Regards

Wenchao Xia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] QEMU Memory subsystem
  2013-06-21  1:51 [Qemu-devel] QEMU Memory subsystem Basim Baig
  2013-06-21  7:04 ` Wenchao Xia
@ 2013-06-21 16:16 ` Lluís Vilanova
  2013-06-22 20:43   ` Basim Baig
  1 sibling, 1 reply; 5+ messages in thread
From: Lluís Vilanova @ 2013-06-21 16:16 UTC (permalink / raw)
  To: qemu-devel

Basim Baig writes:

> Hello,
> I am currently working on a project where I aim to log every memory access made
> by a virtual machine running inside of QEMU (for analyzing kernel behavior). My
> initial approach is to possibly hook into the QEMU mmu implementation and find
> the place where the guest->host page translation or lookup is done. In this way
> I can know any pages accessed by the guest (This is only the first level.
> Eventually I would want to get logging at pointer granularity). I have been
> reading through the source code and online documentations for a week now to get
> a general sense of the qemu internals and codebase.

> I just wanted some advice on what direction I should head to (or who I can talk
> to) If I really want to get into depth of how I can make significant changes to
> qemu memory management and mmu subsystem.

This might provide what you're asking (event 'vmem'):

  https://projects.gso.ac.upc.edu/projects/qemu-dbi/wiki


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] QEMU Memory subsystem
  2013-06-21 16:16 ` Lluís Vilanova
@ 2013-06-22 20:43   ` Basim Baig
  2013-07-17 15:19     ` Yaohui
  0 siblings, 1 reply; 5+ messages in thread
From: Basim Baig @ 2013-06-22 20:43 UTC (permalink / raw)
  To: qemu-devel

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

On Fri, Jun 21, 2013 at 12:16 PM, Lluís Vilanova <vilanova@ac.upc.edu>wrote:

> Basim Baig writes:
>
> > Hello,
> > I am currently working on a project where I aim to log every memory
> access made
> > by a virtual machine running inside of QEMU (for analyzing kernel
> behavior). My
> > initial approach is to possibly hook into the QEMU mmu implementation
> and find
> > the place where the guest->host page translation or lookup is done. In
> this way
> > I can know any pages accessed by the guest (This is only the first level.
> > Eventually I would want to get logging at pointer granularity). I have
> been
> > reading through the source code and online documentations for a week now
> to get
> > a general sense of the qemu internals and codebase.
>
> > I just wanted some advice on what direction I should head to (or who I
> can talk
> > to) If I really want to get into depth of how I can make significant
> changes to
> > qemu memory management and mmu subsystem.
>
> This might provide what you're asking (event 'vmem'):
>
>   https://projects.gso.ac.upc.edu/projects/qemu-dbi/wiki


Hey, the link is broken for me for some reason. I looked at the cached
google copy though and it looks really promising.
If I get this straight, I can only add the changes you made for the "vmem"
event to trace all possible memory accesses made by the guest?

Also I have another question, should I expect it to work with current
version of QEMU or is this only compatible with an older version?

Thanks,

Basim


>
>
>
> Lluis
>
> --
>  "And it's much the same thing with knowledge, for whenever you learn
>  something new, the whole world becomes that much richer."
>  -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
>  Tollbooth
>
>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] QEMU Memory subsystem
  2013-06-22 20:43   ` Basim Baig
@ 2013-07-17 15:19     ` Yaohui
  0 siblings, 0 replies; 5+ messages in thread
From: Yaohui @ 2013-07-17 15:19 UTC (permalink / raw)
  To: qemu-devel

Hi Basim,
Have you solved the problem yet? I am very curious about the result.

Best Wishes,
Yaohui Hu

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-17 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-21  1:51 [Qemu-devel] QEMU Memory subsystem Basim Baig
2013-06-21  7:04 ` Wenchao Xia
2013-06-21 16:16 ` Lluís Vilanova
2013-06-22 20:43   ` Basim Baig
2013-07-17 15:19     ` Yaohui

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).