From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsmYm-0004CI-2T for qemu-devel@nongnu.org; Mon, 16 Dec 2013 23:47:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsmYe-0005DU-Mv for qemu-devel@nongnu.org; Mon, 16 Dec 2013 23:47:08 -0500 Received: from mail-pd0-f176.google.com ([209.85.192.176]:35647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsmYe-0005DO-GT for qemu-devel@nongnu.org; Mon, 16 Dec 2013 23:47:00 -0500 Received: by mail-pd0-f176.google.com with SMTP id w10so6277442pde.35 for ; Mon, 16 Dec 2013 20:46:59 -0800 (PST) Date: Mon, 16 Dec 2013 20:46:58 -0800 From: Christoffer Dall Message-ID: <20131217044658.GI5711@cbox> References: <1385645602-18662-1-git-send-email-peter.maydell@linaro.org> <1385645602-18662-4-git-send-email-peter.maydell@linaro.org> <20131216233950.GC5711@cbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 3/7] target-arm: Add minimal KVM AArch64 support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Patch Tracking , QEMU Developers , "kvmarm@lists.cs.columbia.edu" On Tue, Dec 17, 2013 at 12:21:27AM +0000, Peter Maydell wrote: > On 16 December 2013 23:39, Christoffer Dall wrote: > > On Thu, Nov 28, 2013 at 01:33:18PM +0000, Peter Maydell wrote: > >> + ahcc->target = init.target; > >> + ahcc->dtb_compatible = "arm,arm-v7"; > > > > arm,arm-v8 ? > > Oops, yes, cut-n-pasto. > > > > > >> + > >> + kvm_arm_destroy_scratch_host_vcpu(fdarray); > >> + > >> + /* We can assume any KVM supporting CPU is at least a v8 > >> + * with VFPv4+Neon; this in turn implies most of the other > >> + * feature bits. > > > > not sure I understand the bit about implying other feature bits, the > > only other thing we're setting here is AARCH64 and the features bits are > > enum values? > > target-arm/cpu.c:cpu_realize_fn() has a large set of if statements > like > > if (arm_feature(env, ARM_FEATURE_V8)) { > set_feature(env, ARM_FEATURE_V7); > set_feature(env, ARM_FEATURE_ARM_DIV); > set_feature(env, ARM_FEATURE_LPAE); > } > > because architecturally some features or arch versions imply > that you have others (eg above v8 means we always know > we have LPAE and division)... > > >> + */ > >> + set_feature(&features, ARM_FEATURE_V8); > >> + set_feature(&features, ARM_FEATURE_VFP4); > >> + set_feature(&features, ARM_FEATURE_NEON); > >> + set_feature(&features, ARM_FEATURE_AARCH64); > > ...and because presence of the 'v8', 'vfp4', 'neon' features implies > (as enforced via those if statements) presence of just about every > other feature it means we don't need to have specific > tests for "do the CPU's feature registers say we support > division?" like the v7 KVM code does, because we know > that it's all implied automatically. > Got it, I was looking for something like that, but somehow missed the realize function. Thanks!