qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] About address mapping between host and guest in QEMU


From: Paolo Bonzini
Subject: Re: [Qemu-devel] About address mapping between host and guest in QEMU
Date: Fri, 24 Apr 2015 13:26:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 24/04/2015 04:10, Wenjie Liu wrote:
> The thing I am trying to achieve is to get the data and guest physical
> address of every guest memory access, so I need to known which API can
> be used to do the address transform.

The short answer is that is difficult, because most guest memory
accesses do not call any C function.  QEMU has a virtual TLB; if you
have a TLB hit, the code generated by the JIT compiler does the conversion.

A C function is called only if you have a TLB miss, or if the guest is
accessing a device.  These C functions are defined in
softmmu_template.h.  The header is included multiple from cputlb.c.

Paolo



reply via email to

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