From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1eMR-0003KH-4S for qemu-devel@nongnu.org; Thu, 18 Dec 2014 11:55:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1eMI-0006kp-2U for qemu-devel@nongnu.org; Thu, 18 Dec 2014 11:55:35 -0500 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]:59202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1eMH-0006kV-Ra for qemu-devel@nongnu.org; Thu, 18 Dec 2014 11:55:26 -0500 Received: by mail-wg0-f43.google.com with SMTP id l18so2204520wgh.2 for ; Thu, 18 Dec 2014 08:55:25 -0800 (PST) Sender: Paolo Bonzini Message-ID: <549306F9.2010505@redhat.com> Date: Thu, 18 Dec 2014 17:55:21 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1418721234-9588-1-git-send-email-fred.konrad@greensocs.com> <54915A76.3000408@greensocs.com> <54915AE8.3010809@suse.de> <54915EC6.2050708@suse.de> <8B6B4BF9-3400-4125-8571-F4EF9F12AA89@greensocs.com> <5491666A.7060001@suse.de> <54916829.3020200@redhat.com> <60A11491-8466-4EBC-9877-22E341688DD9@greensocs.com> <6B541656-15EA-47CB-8043-AE3B18FC60D4@greensocs.com> <5492C798.8070503@suse.de> <5492E847.6050701@suse.de> <522D6BCF-C0ED-4ADF-B7CA-7D7787E1238A@greensocs.com> <5492ED45.5040300@suse.de> In-Reply-To: <5492ED45.5040300@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Mark Burton Cc: mttcg@listserver.greensocs.com, Peter Maydell , =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= , QEMU Developers , =?UTF-8?B?TGx1w61zIFZpbGFub3Zh?= On 18/12/2014 16:05, Alexander Graf wrote: > Yeah, the semantics should be tied to what TM would give you. We can > always be more safe than TM in our fallback implementation, but I > wouldn't want to see semantic optimizations tied to the MMIO > implementation put in. > > This is mostly theory though, try to write the code and see where things > fall apart, then we'll be in a much better position to rationalize on > where to do things differently. Yeah, this is why I think LL/SC ops for TCG are more interesting and important than CMPXCHG. Also because x86 doesn't have just CMPXCHG, it also has XADD which you'd have to implement anyway as a LL/SC or CMPXCHG loop, so CMPXCHG doesn't get you all the way. Paolo