qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Get only TCG code without execution


From: Rajat Goyal
Subject: Re: [Qemu-devel] Get only TCG code without execution
Date: Thu, 2 Feb 2012 19:35:39 +0000

Hi,

I have modified QEMU to act as a TCG compiler and give me the TCG code for the whole binary. However, I cannot find a way to obtain the last address in the binary. The symbol table loaded into syminfos contains only the address of the last symbol. Not the address of the last machine instruction. I can obtain this if I can obtain the length of the last section in the ELF. How can I do that in QEMU?

Thanks,
Rajat.

On Sat, Jan 21, 2012 at 12:21 AM, Jamie Lokier <address@hidden> wrote:
陳韋任 wrote:
>   What's load/store exclusive implementation?

It's how some architectures do atomic operations, instead of having
atomic instructions like x86 does.

> And as a general emulator, QEMU shouldn't implement any
> architecture-specific memory model, right? What comes into my mind
> is QEMU only need to follow guest memory operations when translates
> guest binary to TCG ops. When translate TCG ops to host binary, it
> also has to be careful not to mess up the memory ordering.

The error occurs when emulating two or more guest CPUs in parallel
using two or more host CPUs for speed.  Then "not mess up the memory
ordering" may require barrier instructions in the host binary code,
depending on the guest and host architectures.  Without barrier
instructions, the CPUs reorder memory accesses even if the instruction
order is kept the same. This reordering done by the CPU is called the
memory model. TCG cannot currently produce these barrier instructions,
and it's not clear if it will ever be able to do so efficiently.

-- Jamie



--
Rajat Goyal
5th year undergraduate student
Master of Technology in Mathematics and Computing - Integrated Program
Department of Mathematics
IIT Delhi

reply via email to

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