qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Which functions writes to memory?


From: malc
Subject: Re: [Qemu-devel] Which functions writes to memory?
Date: Fri, 16 Apr 2010 10:50:20 +0400 (MSD)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Fri, 16 Apr 2010, Jun Koi wrote:

> On Fri, Apr 16, 2010 at 3:17 PM, malc <address@hidden> 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:address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]