From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v4 09/14] KVM: ARM: Emulation framework and CP15 emulation Date: Mon, 3 Dec 2012 11:05:37 +0000 Message-ID: <20121203110537.GD18579@mudshark.cambridge.arm.com> References: <20121110154203.2836.46686.stgit@chazy-air> <20121110154313.2836.2851.stgit@chazy-air> <20121119150105.GB3205@mudshark.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "kvm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , Marcelo Tosatti , Rusty Russell To: Christoffer Dall Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:40581 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754314Ab2LCLGF (ORCPT ); Mon, 3 Dec 2012 06:06:05 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Nov 30, 2012 at 08:22:28PM +0000, Christoffer Dall wrote: > On Mon, Nov 19, 2012 at 10:01 AM, Will Deacon wrote: > > On Sat, Nov 10, 2012 at 03:43:13PM +0000, Christoffer Dall wrote: > > This should probably be 0xff and also use the macros that Lorenzo is > > introducing: > > > > http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/132977.html > > > > in the A15 TRM bits [7:2] are reserved, so we really only do care > about bits [1:0], and this file is A15 specific, but if you prefer, I > can merge this: The upper bits are RAZ, so yes, please do merge something like this. > diff --git a/arch/arm/kvm/coproc_a15.c b/arch/arm/kvm/coproc_a15.c > index 55cb4a3..685063a 100644 > --- a/arch/arm/kvm/coproc_a15.c > +++ b/arch/arm/kvm/coproc_a15.c > @@ -24,8 +24,6 @@ > #include > #include > > -#define MPIDR_CPUID 0x3 > - > static void reset_mpidr(struct kvm_vcpu *vcpu, const struct coproc_reg *r) > { > /* > @@ -35,8 +33,8 @@ static void reset_mpidr(struct kvm_vcpu *vcpu, const > struct coproc_reg *r) > * revealing the underlying hardware properties is likely to > * be the best choice). > */ > - vcpu->arch.cp15[c0_MPIDR] = (read_cpuid_mpidr() & ~MPIDR_CPUID) > - | (vcpu->vcpu_id & MPIDR_CPUID); > + vcpu->arch.cp15[c0_MPIDR] = (read_cpuid_mpidr() & ~MPIDR_LEVEL_MASK) > + | (vcpu->vcpu_id & MPIDR_LEVEL_MASK); > } > > #include "coproc.h" Will