From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqqBj-0004Hl-JD for qemu-devel@nongnu.org; Fri, 08 May 2015 17:52:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqqBf-0005XF-JQ for qemu-devel@nongnu.org; Fri, 08 May 2015 17:52:07 -0400 Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:33440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqqBf-0005Vm-F4 for qemu-devel@nongnu.org; Fri, 08 May 2015 17:52:03 -0400 Received: by qgdy78 with SMTP id y78so43153182qgd.0 for ; Fri, 08 May 2015 14:52:02 -0700 (PDT) Sender: Richard Henderson Message-ID: <554D2FFE.20204@twiddle.net> Date: Fri, 08 May 2015 14:51:58 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1431118934-20900-1-git-send-email-cota@braap.org> <1431118934-20900-2-git-send-email-cota@braap.org> In-Reply-To: <1431118934-20900-2-git-send-email-cota@braap.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 1/8] cputlb: add physical address to CPUTLBEntry List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" , qemu-devel@nongnu.org Cc: mttcg@greensocs.com, Peter Maydell , Alvise Rigo , Paolo Bonzini , alex.bennee@linaro.org, Frederic Konrad On 05/08/2015 02:02 PM, Emilio G. Cota wrote: > -#if HOST_LONG_BITS == 32 && TARGET_LONG_BITS == 32 > -#define CPU_TLB_ENTRY_BITS 4 > -#else > +#if TARGET_LONG_BITS == 32 > #define CPU_TLB_ENTRY_BITS 5 > +#else > +#define CPU_TLB_ENTRY_BITS 6 > #endif Ouch. 24 of 64 wasted bytes for 64-bit? I wonder if there's a better way we can encode this to avoid 3 copies of the virtual address for read/write/code. Or if we're better off using more than one insn to multiply by a non-power-of-two. Or if the hardware multiplier is fast enough just multiply by the proper constant. r~