From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUHFF-00075m-H3 for qemu-devel@nongnu.org; Wed, 17 Sep 2014 11:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUHF6-00012c-H6 for qemu-devel@nongnu.org; Wed, 17 Sep 2014 11:34:13 -0400 Sender: Richard Henderson Message-ID: <5419A9E0.7000703@twiddle.net> Date: Wed, 17 Sep 2014 08:33:52 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1410793421-6453-1-git-send-email-pbonzini@redhat.com> <1410793421-6453-4-git-send-email-pbonzini@redhat.com> <5418716A.9080508@gmail.com> <54187B3D.8000909@twiddle.net> <5418810E.3080100@redhat.com> <5418846E.8070608@twiddle.net> <5418B877.8080308@twiddle.net> <1959651544.50247750.1410934939759.JavaMail.zimbra@redhat.com> <54194BF9.7010102@redhat.com> In-Reply-To: <54194BF9.7010102@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , Tom Musta , qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org On 09/17/2014 01:53 AM, Paolo Bonzini wrote: > +/* All the TLBs together must be smaller than 64k on RISC machines */ > +#if !defined(__i386__) && !defined(__x86_64__) && !defined(__aarch64__) \ > + && !defined(__sparc__) && !defined(CONFIG_TCG_INTERPRETER) > +#define CPU_TLB_BITS (NB_MMU_MODES < 8 ? 8 : 12 - CPU_TLB_ENTRY_BITS) > +#else > +#define CPU_TLB_BITS 8 > +#endif Hum. Well, it's not that all the tlbs together that must be less than 64k, it's the addend of the first entry of the last tlb that must be within 64k of the start of env. Nit picking, but perhaps we can word the comment better. And if we choose to do something like this, this is where I'd prefer a define in the relevant tcg-target.h. Because you've missed ia64 and s390 that have positive offsets larger than 64k (21 and 19 bits, respectively). But otherwise I'm ok with this as a solution. r~