From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH] ARM: KVM: Check the cpuid we're being asked to emulate. Date: Mon, 21 May 2012 10:43:56 +0930 Message-ID: <874nra49pn.fsf@rustcorp.com.au> References: <20120312065134.8074.36949.stgit@ubuntu> <20120312065156.8074.33639.stgit@ubuntu> <87iphw87y4.fsf@rustcorp.com.au> <87likr3ch3.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Rusty Russell , android-virt@lists.cs.columbia.edu, kvm@vger.kernel.org, tech@virtualopensystems.com, Marc Zyngier , "Peter Maydell" To: Christoffer Dall Return-path: Received: from ozlabs.org ([203.10.76.45]:56290 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754700Ab2EUBSH convert rfc822-to-8bit (ORCPT ); Sun, 20 May 2012 21:18:07 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 20 May 2012 14:34:48 -0400, Christoffer Dall wrote: > On Wed, May 16, 2012 at 7:58 PM, Rusty Russell wrote: > > On Mon, 14 May 2012 18:57:20 -0400, Christoffer Dall wrote: > >> On Thu, Mar 22, 2012 at 8:41 PM, Rusty Russell wrote: > >> > As our emulation gets more sophisticated, we need to know what C= PU model > >> > we're dealing with. =C2=A0Particularly for some of the nastier w= orkarounds. > >> > > >> > Let's start with Cortex A-15. =C2=A0We can then test the MIDR el= sewhere in the > >> > code, knowing that it's one of a finite set of allowed values. > > > > (Revisiting this now) > > > > The intent is good, this patch is not the right way to do it though= =2E =C2=A0I > > think want an explicit ioctl to tell the kernel what CPU; since the > > kernel initialized the regs, it needs to know. > > > not sure of your point exactly, but if I understand correctly, what > you're saying is that since the kernel initializes all the regs (at > least it's going to) we want an ioctl to say "this is the cpu for > which you will initialize the regs"? >=20 > that also makes for a more friendly user space interface than "you > need to set this register to this cryptic value to emulate this > cpu"... Yes, exactly. Esp. since it also effects some of the cp15 emulation hacks. Cheers, Rusty.