Received: from eggs.gnu.org ([2001:4830:134:3::10]:55680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQbqc-0005XI-MG for qemu-devel@nongnu.org; Fri, 22 Jul 2016 10:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQbqX-0003If-MP for qemu-devel@nongnu.org; Fri, 22 Jul 2016 10:54:41 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:36135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQbqX-0003Hv-FP for qemu-devel@nongnu.org; Fri, 22 Jul 2016 10:54:37 -0400 Received: by mail-pf0-x244.google.com with SMTP id y134so7404334pfg.3 for ; Fri, 22 Jul 2016 07:54:36 -0700 (PDT) Sender: Richard Henderson References: <1468863326-20919-1-git-send-email-pbonzini@redhat.com> From: Richard Henderson Message-ID: <7b6a72b3-eb31-acb3-9f02-caf71b0b4074@twiddle.net> Date: Fri, 22 Jul 2016 20:24:29 +0530 MIME-Version: 1.0 In-Reply-To: <1468863326-20919-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tcg: fixup switching tb invalidation to volatile_read/volatile_set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, sergey.fedorov@linaro.org On 07/18/2016 11:05 PM, Paolo Bonzini wrote: > Because atomic_read/atomic_set does not work on platforms that only > support 32-bit atomic writes, we need volatile_read/volatile_set. > > This patch fixes up Sergey's series to use volatile_read/volatile_set > instead of atomic_read/atomic_set. Because volatile_read/volatile_set > can cause torn writes, the invalidation mechanism for SPARC targets is > changed to use flags instead of cs_base. Torn writes are not a problem > for targets that don't use cs_base at all, because 0xffffffff00000000 > or 0x00000000ffffffff cs_bases cannot be confused with the cs_base of > a valid translation block. > > The patch also includes two fixes, respectively using atomic_rcu_read in > tb_find and fixing computation of the hash index in tb_phys_invalidate. > > Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson r~