From: Sergey Fedorov <serge.fdrv@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>,
"Richard Henderson" <rth@twiddle.net>
Cc: Pranith Kumar <bobby.prani@gmail.com>,
Peter Maydell <peter.maydell@linaro.org>,
"open list:i386 target" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend
Date: Wed, 25 May 2016 22:43:50 +0300 [thread overview]
Message-ID: <57460076.1080301@gmail.com> (raw)
In-Reply-To: <87twhmc54i.fsf@linaro.org>
On 25/05/16 22:25, Alex Bennée wrote:
> Richard Henderson <rth@twiddle.net> writes:
>> On 05/24/2016 10:18 AM, Pranith Kumar wrote:
>>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>>> ---
>>> tcg/i386/tcg-target.h | 1 +
>>> tcg/i386/tcg-target.inc.c | 9 +++++++++
>>> tcg/tcg-opc.h | 2 +-
>>> tcg/tcg.c | 1 +
>>> 4 files changed, 12 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
>>> index 92be341..93ea42e 100644
>>> --- a/tcg/i386/tcg-target.h
>>> +++ b/tcg/i386/tcg-target.h
>>> @@ -100,6 +100,7 @@ extern bool have_bmi1;
>>> #define TCG_TARGET_HAS_muls2_i32 1
>>> #define TCG_TARGET_HAS_muluh_i32 0
>>> #define TCG_TARGET_HAS_mulsh_i32 0
>>> +#define TCG_TARGET_HAS_fence 1
>> This has to be defined for all hosts.
>>
>> The default implementation should be a function call into tcg-runtime.c that
>> calls smp_mb().
> That would solves the problem of converting the various backends
> piecemeal - although obviously we should move to all backends having
> "native" support ASAP. However by introducing expensive substitute
> functions we will slow down the translations as each front end is
> expanded to translate the target barrier ops.
I think it would better not to defer native support for the operation.
It should be relatively simple instruction. Otherwise we could wind up
deferring this indefinitely.
> Should we make the emitting of the function call/TCGop conditional on
> MTTCG being enabled? If we are running in round-robin mode there is no
> need to issue any fence operations.
Good idea.
Kind regards,
Sergey
next prev parent reply other threads:[~2016-05-25 19:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160524171856.1000-1-bobby.prani@gmail.com>
2016-05-24 17:18 ` [Qemu-devel] [RFC PATCH 1/3] Introduce TCGOpcode for fence instruction Pranith Kumar
2016-05-24 17:32 ` Peter Maydell
2016-05-24 18:05 ` Pranith Kumar
2016-05-24 17:18 ` [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend Pranith Kumar
2016-05-25 17:35 ` Richard Henderson
2016-05-25 19:25 ` Alex Bennée
2016-05-25 19:43 ` Sergey Fedorov [this message]
2016-05-25 19:59 ` Pranith Kumar
2016-05-25 20:02 ` Sergey Fedorov
2016-05-25 19:50 ` Richard Henderson
2016-05-25 19:57 ` Pranith Kumar
2016-05-25 19:56 ` Pranith Kumar
2016-05-26 16:09 ` Alex Bennée
2016-05-24 17:18 ` [Qemu-devel] [RFC PATCH 3/3] tcg: Add frontend support for fence gen in ARMv7 Pranith Kumar
2016-05-25 17:36 ` Richard Henderson
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=57460076.1080301@gmail.com \
--to=serge.fdrv@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=bobby.prani@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).