From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQha5-0006N7-1F for qemu-devel@nongnu.org; Thu, 20 Mar 2014 14:20:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQhZy-000813-OB for qemu-devel@nongnu.org; Thu, 20 Mar 2014 14:20:40 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:49782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQhZy-00080x-Gy for qemu-devel@nongnu.org; Thu, 20 Mar 2014 14:20:34 -0400 Received: by mail-la0-f49.google.com with SMTP id mc6so892676lab.8 for ; Thu, 20 Mar 2014 11:20:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1394134385-1727-11-git-send-email-peter.maydell@linaro.org> References: <1394134385-1727-1-git-send-email-peter.maydell@linaro.org> <1394134385-1727-11-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Thu, 20 Mar 2014 18:20:13 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v4 10/21] target-arm: Add v8 mmu translation support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Cc: Rob Herring , Peter Crosthwaite , Patch Tracking , Michael Matz , Laurent Desnogues , Dirk Mueller , Will Newton , "kvmarm@lists.cs.columbia.edu" , Richard Henderson On 6 March 2014 19:32, Peter Maydell wrote: > @@ -1065,8 +1065,9 @@ static void par_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) > */ > static inline bool extended_addresses_enabled(CPUARMState *env) > { > - return arm_feature(env, ARM_FEATURE_LPAE) > - && (env->cp15.c2_control & (1U << 31)); > + return arm_feature(env, ARM_FEATURE_V8) > + || (arm_feature(env, ARM_FEATURE_LPAE) > + && (env->cp15.c2_control & (1U << 31))); > } Just noticed a minor nit here -- rather than checking for ARM_FEATURE_V8 we should be using arm_el_is_aa64(env, 1) (as the translation code itself does). At the moment the two give the same answer, but if/when we ever support running a 32 bit kernel on an ARMv8 CPU they'll be different, so better to get the check right to start with. I'll fix this for the next round of these patches (and also update the now out of date comment). thanks -- PMM