From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOtNf-0004Aj-PU for qemu-devel@nongnu.org; Fri, 20 Feb 2015 14:36:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOtNc-0005uP-IC for qemu-devel@nongnu.org; Fri, 20 Feb 2015 14:36:55 -0500 Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]:63895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOtNc-0005uJ-DR for qemu-devel@nongnu.org; Fri, 20 Feb 2015 14:36:52 -0500 Received: by mail-qa0-f43.google.com with SMTP id bm13so14037536qab.2 for ; Fri, 20 Feb 2015 11:36:52 -0800 (PST) Sender: Richard Henderson Message-ID: <54E78CD0.5090702@twiddle.net> Date: Fri, 20 Feb 2015 11:36:48 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1424455040-3335-1-git-send-email-pbonzini@redhat.com> <1424455040-3335-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1424455040-3335-2-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] tcg: add TCG_TARGET_TLB_DISPLACEMENT_BITS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: agraf@suse.de On 02/20/2015 09:57 AM, Paolo Bonzini wrote: > diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h > index 7a9980e..8ba977a 100644 > --- a/tcg/i386/tcg-target.h > +++ b/tcg/i386/tcg-target.h > @@ -25,6 +25,7 @@ > #define TCG_TARGET_I386 1 > > #define TCG_TARGET_INSN_UNIT_SIZE 1 > +#define TCG_TARGET_TLB_DISPLACEMENT_BITS 32 31. Positive displacements only in 64-bit mode. I don't think it's worth conditionalizing this for 32-bit, since we can't actually allocate 2G of TLBs and then actually accomplish anything. ;-) > diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h > index c88a1c9..f5ba52c 100644 > --- a/tcg/mips/tcg-target.h > +++ b/tcg/mips/tcg-target.h > @@ -27,6 +27,7 @@ > #define TCG_TARGET_MIPS 1 > > #define TCG_TARGET_INSN_UNIT_SIZE 4 > +#define TCG_TARGET_TLB_DISPLACEMENT_BITS 16 > #define TCG_TARGET_NB_REGS 32 > > typedef enum { > diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h > index 32ac442..7ce7048 100644 > --- a/tcg/ppc/tcg-target.h > +++ b/tcg/ppc/tcg-target.h > @@ -32,6 +32,7 @@ > > #define TCG_TARGET_NB_REGS 32 > #define TCG_TARGET_INSN_UNIT_SIZE 4 > +#define TCG_TARGET_TLB_DISPLACEMENT_BITS 16 Close enough, since the BUILD_BUG_ON should still catch this out if somehow the size is within that last 16 bytes of 64k. r~