qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Mark Burton <mark.burton@greensocs.com>
Cc: mttcg@greensocs.com, Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Llu?s Vilanova <vilanova@ac.upc.edu>,
	KONRAD Fr?d?ric <fred.konrad@greensocs.com>
Subject: Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*.
Date: Wed, 17 Dec 2014 16:20:40 +0000	[thread overview]
Message-ID: <20141217162039.GC31071@work-vm> (raw)
In-Reply-To: <7200ECC8-49FE-4CEB-B41E-AC15093554B1@greensocs.com>

* Mark Burton (mark.burton@greensocs.com) wrote:
> Actually - I dont see any other option.
> Playing with the ideas - it seems to me that if we were to implement ?generic? Lock/unlock instructions which could then somehow we ?combined? with loads/stores then we would be relying on an optimisation step to ?notice? that this could be combined into e.g. a store EX on ARM, or whatever. That strikes me as risky .
> 
> But then - if we add load/store exclusive type operations - thats great for e.g. ARM on X86, but does it really cover other architectures well?
> 
> I am worried that if we go this path, we will soon end up with a lot of architecturally specific TCG ops?.

I'd expect you to end up with two types;
   1) the ARM/MIPS/PPC split load/store,
   2) the x86/s390/ARMv8.1 compare exchange.

The tricky thing is to pick a sane set of TCG ops that is a good fit into each
of the two groups on different targets.

Dave


> 
> Cheers
> 
> Mark.
> 
> > On 17 Dec 2014, at 12:25, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > 
> > 
> > 
> > On 17/12/2014 12:18, Alexander Graf wrote:
> >> 
> >> So I think the best way to go forward would be to add transaction_start
> >> and transaction_end opcodes to TCG and implement them as mutex locks
> >> today. When you get the chance to get yourself a machine that supports
> >> actual TM, try to replace them with transaction start/end blocks and
> >> have the normal mutex code as fallback if the transaction fails.
> > 
> > Or implement load_locked/store_conditional TCG ops.  They can be
> > implemented as transactions, hardware ll/sc, or something slow that uses
> > the MMU.
> > 
> > Paolo
> 
> 
> 	 +44 (0)20 7100 3485 x 210
>  +33 (0)5 33 52 01 77x 210
> 
> 	+33 (0)603762104
> 	mark.burton
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2014-12-17 16:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  9:13 [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_* fred.konrad
2014-12-16  9:31 ` Paolo Bonzini
2014-12-16  9:36   ` Frederic Konrad
2014-12-16  9:49     ` Paolo Bonzini
2014-12-16  9:54       ` Frederic Konrad
2014-12-16 16:37 ` Peter Maydell
2014-12-17 10:27   ` Frederic Konrad
2014-12-17 10:28     ` Alexander Graf
2014-12-17 10:31       ` Mark Burton
2014-12-17 10:45         ` Alexander Graf
2014-12-17 11:12           ` Mark Burton
2014-12-17 11:18             ` Alexander Graf
2014-12-17 11:25               ` Paolo Bonzini
2014-12-17 11:36                 ` Peter Maydell
2014-12-17 16:17                   ` Mark Burton
2014-12-17 16:27                     ` Peter Maydell
2014-12-17 16:29                       ` Mark Burton
2014-12-17 16:39                         ` Peter Maydell
2014-12-17 16:51                           ` Peter Maydell
2014-12-18  9:12                           ` Mark Burton
2014-12-18 12:24                             ` Alexander Graf
2014-12-18 12:35                               ` Dr. David Alan Gilbert
2014-12-18 13:28                               ` Paolo Bonzini
2014-12-18 13:56                               ` Mark Burton
2014-12-18 14:20                               ` Mark Burton
2014-12-18 14:44                                 ` Alexander Graf
2014-12-18 14:51                                   ` Mark Burton
2014-12-18 15:05                                     ` Alexander Graf
2014-12-18 15:09                                       ` Mark Burton
2014-12-18 16:55                                       ` Paolo Bonzini
2014-12-17 15:52                 ` Mark Burton
2014-12-17 16:20                   ` Dr. David Alan Gilbert [this message]
2014-12-17 11:19             ` Peter Maydell

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=20141217162039.GC31071@work-vm \
    --to=dgilbert@redhat.com \
    --cc=agraf@suse.de \
    --cc=fred.konrad@greensocs.com \
    --cc=mark.burton@greensocs.com \
    --cc=mttcg@greensocs.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vilanova@ac.upc.edu \
    /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).