From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPWiO-0005yS-UX for qemu-devel@nongnu.org; Wed, 12 Aug 2015 10:09:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPWiK-0003Jy-O6 for qemu-devel@nongnu.org; Wed, 12 Aug 2015 10:09:12 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:33337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPWiK-0003Jm-HF for qemu-devel@nongnu.org; Wed, 12 Aug 2015 10:09:08 -0400 Received: by wijp15 with SMTP id p15so219477182wij.0 for ; Wed, 12 Aug 2015 07:09:07 -0700 (PDT) Sender: Paolo Bonzini References: <1439220437-23957-1-git-send-email-fred.konrad@greensocs.com> <1439220437-23957-17-git-send-email-fred.konrad@greensocs.com> From: Paolo Bonzini Message-ID: <55CB537F.4060501@redhat.com> Date: Wed, 12 Aug 2015 16:09:03 +0200 MIME-Version: 1.0 In-Reply-To: <1439220437-23957-17-git-send-email-fred.konrad@greensocs.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fred.konrad@greensocs.com, 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 10/08/2015 17:27, fred.konrad@greensocs.com wrote: > From: KONRAD Frederic > > tb_flush is not thread safe we definitely need to exit VCPUs to do that. > This introduces tb_flush_safe which just creates an async safe work which will > do a tb_flush later. > > Signed-off-by: KONRAD Frederic You could also allocate a new code buffer and free the old one with call_rcu. This should simplify things a lot. Paolo