From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGqqZ-0008HY-TA for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:17:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGqqV-0003Rp-U6 for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:17:31 -0500 Received: from mail-lb0-f182.google.com ([209.85.217.182]:57678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGqqV-0003Rb-NF for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:17:27 -0500 Received: by mail-lb0-f182.google.com with SMTP id l4so29119171lbv.13 for ; Thu, 29 Jan 2015 07:17:27 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1421428797-23697-2-git-send-email-fred.konrad@greensocs.com> References: <1421428797-23697-1-git-send-email-fred.konrad@greensocs.com> <1421428797-23697-2-git-send-email-fred.konrad@greensocs.com> From: Peter Maydell Date: Thu, 29 Jan 2015 15:17:06 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC 01/10] target-arm: protect cpu_exclusive_*. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= Cc: mttcg@listserver.greensocs.com, "J. Kiszka" , Mark Burton , QEMU Developers , Alexander Graf , Paolo Bonzini On 16 January 2015 at 17:19, wrote: > From: KONRAD Frederic > > This adds a lock to avoid multiple exclusive access at the same time in case of > TCG multithread. > > Signed-off-by: KONRAD Frederic All the same comments I had on this patch earlier still apply: * I think adding mutex handling code to all the target-* frontends rather than providing facilities in common code for them to use is the wrong approach * You will fail to unlock the mutex if the ldrex or strex takes a data abort * This is making no attempt to learn from or unify with the existing attempts at handling exclusives in linux-user. When we've done this work we should have a single mechanism for handling exclusives in a multithreaded host environment which is used by both softmmu and useronly configs thanks -- PMM