From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3htf-0007VR-0o for qemu-devel@nongnu.org; Wed, 04 Apr 2018 08:52:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3htb-0003rd-T4 for qemu-devel@nongnu.org; Wed, 04 Apr 2018 08:52:15 -0400 Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]:35179) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f3htb-0003rL-Ko for qemu-devel@nongnu.org; Wed, 04 Apr 2018 08:52:11 -0400 Received: by mail-wr0-x22c.google.com with SMTP id 80so22505157wrb.2 for ; Wed, 04 Apr 2018 05:52:11 -0700 (PDT) References: <20180330133525.10994-1-jcmvbkbc@gmail.com> <87vad8cl2v.fsf@linaro.org> <87muyjcllw.fsf@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: Date: Wed, 04 Apr 2018 13:52:09 +0100 Message-ID: <87d0zfcex2.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] linux-user: call cpu_copy under clone_lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Max Filippov , qemu-devel , Laurent Vivier Peter Maydell writes: > On 4 April 2018 at 11:27, Alex Benn=C3=A9e wrote: >> I'm wondering if it should be doing more. After all start/end_exclusive >> rely on the cpu list and that isn't updated on thread creation - and >> without that a bunch of other things fail like ld/st exclusive after >> your first new thread is spawned. > > I think that is handled because creating a new thread calls > cpu_copy(), which creates a new CPU object, which adds itself > to the CPU list in its realize function (same as for system > emulation new CPU objects). Ahh that makes sense - I missed it hidden behind the realize. -- Alex Benn=C3=A9e