From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akhLw-0002bo-D5 for qemu-devel@nongnu.org; Mon, 28 Mar 2016 20:17:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akhLt-0001b9-8J for qemu-devel@nongnu.org; Mon, 28 Mar 2016 20:17:48 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:36607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akhLt-0001b4-2f for qemu-devel@nongnu.org; Mon, 28 Mar 2016 20:17:45 -0400 Received: by mail-qk0-x241.google.com with SMTP id e124so3603qkc.3 for ; Mon, 28 Mar 2016 17:17:45 -0700 (PDT) Sender: Richard Henderson 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> <56F99AE0.5080008@redhat.com> From: Richard Henderson Message-ID: <56F9C9A5.4040904@twiddle.net> Date: Mon, 28 Mar 2016 17:17:41 -0700 MIME-Version: 1.0 In-Reply-To: <56F99AE0.5080008@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Paolo Bonzini , Sergey Fedorov , sergey.fedorov@linaro.org, qemu-devel@nongnu.org Cc: Peter Crosthwaite On 03/28/2016 01:58 PM, Paolo Bonzini wrote: > > > 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. That might work by accident, but it might not. You'd need to reserve a bit across all of the targets. r~