From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP7TT-000424-TJ for qemu-devel@nongnu.org; Tue, 11 Aug 2015 07:12:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZP7TO-000446-V1 for qemu-devel@nongnu.org; Tue, 11 Aug 2015 07:12:07 -0400 Received: from greensocs.com ([193.104.36.180]:32870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP7TO-00043X-Nk for qemu-devel@nongnu.org; Tue, 11 Aug 2015 07:12:02 -0400 Message-ID: <55C9D87D.1020005@greensocs.com> Date: Tue, 11 Aug 2015 13:11:57 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <1439220437-23957-1-git-send-email-fred.konrad@greensocs.com> <1439220437-23957-3-git-send-email-fred.konrad@greensocs.com> <55C9D41E.3080405@redhat.com> In-Reply-To: <55C9D41E.3080405@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH V7 02/19] cpus: add tcg_exec_flag. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org, mttcg@listserver.greensocs.com Cc: alex.bennee@linaro.org, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, guillaume.delbergue@greensocs.com On 11/08/2015 12:53, Paolo Bonzini wrote: > > On 10/08/2015 17:27, fred.konrad@greensocs.com wrote: >> @@ -583,5 +587,6 @@ int cpu_exec(CPUState *cpu) >> >> /* fail safe : never use current_cpu outside cpu_exec() */ >> current_cpu = NULL; >> + tcg_cpu_allow_execution(cpu); > I don't think this is correct; safe_work_pending() is a much clearer > test. I'll revert locally to the previous version to play more with the > code. > > Paolo Yes definitely but we might have a race if we just use safe_work_pending(). Fred > >> return ret; >> } >> diff --git a/include/qom/cpu.h b/include/qom/cpu.h