From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0v80-0008Tq-Le for qemu-devel@nongnu.org; Tue, 16 Dec 2014 11:37:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0v7r-00016Z-NS for qemu-devel@nongnu.org; Tue, 16 Dec 2014 11:37:40 -0500 Received: from mail-la0-f49.google.com ([209.85.215.49]:53922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0v7r-00016R-CH for qemu-devel@nongnu.org; Tue, 16 Dec 2014 11:37:31 -0500 Received: by mail-la0-f49.google.com with SMTP id hs14so11663767lab.36 for ; Tue, 16 Dec 2014 08:37:30 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1418721234-9588-1-git-send-email-fred.konrad@greensocs.com> References: <1418721234-9588-1-git-send-email-fred.konrad@greensocs.com> From: Peter Maydell Date: Tue, 16 Dec 2014 16:37:10 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC PATCH] 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, Paolo Bonzini , Mark Burton , QEMU Developers , =?UTF-8?Q?Llu=C3=ADs_Vilanova?= On 16 December 2014 at 09:13, wrote: > From: KONRAD Frederic > > This adds a lock to avoid multiple exclusive access at the same time in case of > TCG multithread. This feels to me like it's not really possible to review on its own, since you can't see how it fits into the design of the rest of the multithreading support. The other approach here rather than having a pile of mutexes in the target-* code would be to have TCG IR support for "begin critical section"/"end critical section". Then you could have the main loop ensure that no other CPU is running at the same time as the critical-section code. (linux-user already has an ad-hoc implementation of this for the exclusives.) -- PMM