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: Peter Maydell
Subject: Re: [Qemu-devel] Get only TCG code without execution
Date: Fri, 20 Jan 2012 10:46:40 +0000

On 20 January 2012 09:44, 陳韋任 <address@hidden> wrote:
> On Fri, Jan 20, 2012 at 09:09:46AM +0000, Peter Maydell wrote:
>  AFAIK, LLVM defines it's own memory model [1] which is inspired by the C++11
> memory model. That's why I think instead of implementing architecture-specific
> memory model, QEMU should define a more general (strict) one.

LLVM has the advantage that it can require all its incoming code
to adhere to a common memory model (ie something like the C++ one).

>  You said,
>
>  "guest binaries don't actually rely that much on the memory model."
>
> I think the reason is those guest binaries are single thread. Memory model is
> important in multi-threaded case. BTW, our binary translator now can translate
> x86 binary to ARM binary, and ARM has weaker memory model than x86.

Yes. At the moment this works for QEMU on ARM hosts because in
system mode QEMU itself is single-threaded so the nastier interactions
between multiple guest CPUs don't occur (just about every memory model
defines that memory interactions within a single thread of execution
behave in the obvious manner). I also had in mind that guest binaries
tend to make fairly stereotypical use of things like LDREX/STREX
rather than relying on obscure details like their interaction with
plain load/stores.

> P.S. Happy Chinese New Year. :)

You too!

-- PMM



reply via email to

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