From: Peter Maydell <peter.maydell@linaro.org>
To: Rajat Goyal <rajat.goyal.90@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Get only TCG code without execution
Date: Thu, 19 Jan 2012 16:15:07 +0000 [thread overview]
Message-ID: <CAFEAcA8ajL_d6+hM+AJbyCm=p_ZA1tedp9KyJaGTRbAN4E3piA@mail.gmail.com> (raw)
In-Reply-To: <CAOSa+Cv0ZxtZsKF4TWjnwmNOc_TP09w1Rbtcss3Z+ZQFTRYBaA@mail.gmail.com>
On 19 January 2012 16:00, Rajat Goyal <rajat.goyal.90@gmail.com> wrote:
> Thank you so much for your help Peter. I was using version 0.15.1. On 1.0,
> it works like a dream!
Good.
> I was not talking about semantics of individual instructions but semantics
> of the whole multi-threaded program. Multi-threaded programs can lead to
> several different (most of which are unintended) states of the CPU. What
> states are possible is described in a mathematically rigorous definition of
> the ARM memory model. My task is to implement this memory model over TCG ops
> and then compare the results on several different (multi-threaded) litmus
> tests with the implementation of the memory model over ARM instructions.
Some points to note:
* The current QEMU code has some known race conditions which can cause
crashes/hangs in heavily threaded programs in linux-user mode; see eg
https://bugs.launchpad.net/qemu/+bug/668799
* We don't really make a serious attempt at implementing the ARM memory
model in QEMU; our load/store exclusive implementation is pretty hopeless,
for instance
* In linux-user mode we basically just pass loads/stores/etc through as
host-cpu loads/stores, so you get whatever the host's memory model semantics
are, not what the guest CPU is supposed to do
* a combination of the above plus the fact we don't implement caches in
system emulation mode means that our implementation of all the barrier
insns is a simple no-op; you'll never see barriers at the TCG op level
> For
> the same task, I need QEMU to give me the TCG translation for code which it
> never branches into and hence, never needs to translate and execute (because
> ARM multiprocessors can perform speculative execution).
QEMU does not do TCG translation for code which it doesn't branch into.
Indeed, it's not actually possible to tell whether it is code and not
data until you've branched into it...
-- PMM
next prev parent reply other threads:[~2012-01-19 16:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-15 23:09 [Qemu-devel] Get only TCG code without execution Rajat Goyal
2012-01-16 5:32 ` Mulyadi Santosa
2012-01-16 8:41 ` Stefan Hajnoczi
2012-01-16 12:23 ` Rajat Goyal
2012-01-16 12:29 ` Peter Maydell
2012-01-17 1:04 ` 陳韋任
2012-01-17 8:33 ` Peter Maydell
2012-01-19 16:00 ` Rajat Goyal
2012-01-19 16:15 ` Peter Maydell [this message]
2012-01-20 6:38 ` 陳韋任
2012-01-21 0:21 ` Jamie Lokier
2012-02-02 19:35 ` Rajat Goyal
2012-01-20 6:12 ` 陳韋任
2012-01-20 9:09 ` Peter Maydell
2012-01-20 9:44 ` 陳韋任
2012-01-20 10:46 ` Peter Maydell
2012-01-20 19:40 ` Jamie Lokier
2012-02-06 7:25 ` 陳韋任
2012-02-10 3:08 ` Jamie Lokier
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='CAFEAcA8ajL_d6+hM+AJbyCm=p_ZA1tedp9KyJaGTRbAN4E3piA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rajat.goyal.90@gmail.com \
/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).