qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: Jun Koi <junkoi2004@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Which functions writes to memory?
Date: Fri, 16 Apr 2010 10:50:20 +0400 (MSD)	[thread overview]
Message-ID: <alpine.LNX.2.00.1004161049280.15076@linmac> (raw)
In-Reply-To: <y2ufdaac4d51004152338r1aeb2dd5t42b2c47cce6e2dea@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1456 bytes --]

On Fri, 16 Apr 2010, Jun Koi wrote:

> On Fri, Apr 16, 2010 at 3:17 PM, malc <av1474@comtv.ru> wrote:
> > On Fri, 16 Apr 2010, Jun Koi wrote:
> >
> >> Hi,
> >>
> >> I am writing a small tool to trace all the activities that write to an
> >> area of (virtual) memory in Qemu.
> >> I am currently doing that by putting my code at the top of the below
> >> macro in softmmu_header.h
> >>
> >> static inline void glue(glue(st, SUFFIX), MEMSUFFIX)....
> >>
> >> However, it seems I still miss some written events: in some occasions,
> >> I believe that Qemu has another code writing data to memory, which
> >> happens even before this macro.
> >> Is it true that elsewhere, Qemu also writes into memory besides using
> >> above function?
> >>
> >> The memory area I am tracking for written events belong to normal area
> >> in OS kernel, where usually only normal code (kernel, not something
> >> like SMM handler)  write to.
> >
> > Once the TLB is properly set up st helpers are bypassed entirely and
> > tcg generated code writes to it directly, it's quite easy to "workaround"
> > that at the expense of much slower execution.
> >
> 
> This saves me a lot of frustrated time, thanks!
> 
> Now I can see that tcg code calls to __stb*_mmu(), but cannot find any
> code call to st*_mmu().
> Do you have any hint?

The tcg generated code fetches appropriate helper's address from the
qemu_st/ld_helpers array and calls it indirectly.

-- 
mailto:av1474@comtv.ru

  reply	other threads:[~2010-04-16  8:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16  5:56 [Qemu-devel] Which functions writes to memory? Jun Koi
2010-04-16  6:17 ` malc
2010-04-16  6:38   ` Jun Koi
2010-04-16  6:50     ` malc [this message]
2010-04-16  6:59       ` Jun Koi
2010-04-16  8:15         ` malc

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=alpine.LNX.2.00.1004161049280.15076@linmac \
    --to=av1474@comtv.ru \
    --cc=junkoi2004@gmail.com \
    --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).