From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAerp-0005oi-Fb for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAerl-0002ZK-OJ for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:54:00 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:33934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAerl-0002Z2-Gc for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:53:57 -0400 Received: by mail-lf0-x243.google.com with SMTP id k192so1036772lfb.1 for ; Wed, 08 Jun 2016 07:53:57 -0700 (PDT) References: <20160526163549.3276-4-a.rigo@virtualopensystems.com> <87d1nrhjkc.fsf@linaro.org> From: Sergey Fedorov Message-ID: <57583182.3090701@gmail.com> Date: Wed, 8 Jun 2016 17:53:54 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alvise rigo , =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: MTTCG Devel , QEMU Developers , Jani Kokkonen , Claudio Fontana , VirtualOpenSystems Technical Team , =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= , Paolo Bonzini , Richard Henderson , "Emilio G. Cota" , Peter Maydell On 08/06/16 17:10, alvise rigo wrote: > Using run_on_cpu() we might deadlock QEMU if other vCPUs are waiting > for the current vCPU. We need to exit from the vCPU loop in order to > avoid this. I see, we could deadlock indeed. Alternatively, we may want fix run_on_cpu() to avoid waiting for completion by itself when called from CPU loop. Kind regards, Sergey