From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akeEs-0005Ib-Pi for qemu-devel@nongnu.org; Mon, 28 Mar 2016 16:58:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akeEp-0000It-LA for qemu-devel@nongnu.org; Mon, 28 Mar 2016 16:58:18 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akeEp-0000Im-En for qemu-devel@nongnu.org; Mon, 28 Mar 2016 16:58:15 -0400 Received: by mail-wm0-x242.google.com with SMTP id 77so13202162wmi.0 for ; Mon, 28 Mar 2016 13:58:15 -0700 (PDT) Sender: Paolo Bonzini References: <1458222382-6498-1-git-send-email-sergey.fedorov@linaro.org> <1458222382-6498-5-git-send-email-sergey.fedorov@linaro.org> <56F97AFE.2020401@gmail.com> From: Paolo Bonzini Message-ID: <56F99AE0.5080008@redhat.com> Date: Mon, 28 Mar 2016 22:58:08 +0200 MIME-Version: 1.0 In-Reply-To: <56F97AFE.2020401@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 4/5] tcg: reorder removal from lists in tb_phys_invalidate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov , sergey.fedorov@linaro.org, qemu-devel@nongnu.org Cc: Peter Crosthwaite , Richard Henderson On 28/03/2016 20:42, Sergey Fedorov wrote: > On 17/03/16 16:46, sergey.fedorov@linaro.org wrote: >> First the translation block is invalidated, for which a simple write >> to tb->pc is enough. This means that cpu-exec will not pick up anymore >> the block, though it may still execute it through chained jumps. This >> also replaces the NULLing out of the pointer in the CPUs' local cache. > > Although, using 'tb->pc' to mark a TB as invalid is probably not such a > good idea. There may be some cases when PC could become equal to -1. For > example, ARMv6-M uses PC >= 0xFFFFFFF0 to perform exception return. So > we'd better introduce a separate 'tb->valid' or 'tb->invalid' flag. It is also possible to use tb->flags for that. I suspect that all-ones tb flags is never valid, but it could also be a #define. Paolo