From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEkRD-00058H-Pe for qemu-devel@nongnu.org; Mon, 13 Jul 2015 16:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEkR8-0006cf-4w for qemu-devel@nongnu.org; Mon, 13 Jul 2015 16:34:55 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:59259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEkR7-0006cG-VL for qemu-devel@nongnu.org; Mon, 13 Jul 2015 16:34:50 -0400 Date: Mon, 13 Jul 2015 13:34:46 -0700 From: Meador Inge Message-ID: <20150713203446.GC24071@mentor.com> References: <1436208832-17651-1-git-send-email-meadori@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 0/2] target-arm: "any" CPUs for system-mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , QEMU Developers On Mon, Jul 06, 2015 at 04:05:46PM -0700, Peter Crosthwaite wrote: > On Mon, Jul 6, 2015 at 3:49 PM, Peter Maydell wrote: > > On 6 July 2015 at 23:42, Peter Crosthwaite wrote: > >> On Mon, Jul 6, 2015 at 3:29 PM, Peter Maydell wrote: > >>> On 6 July 2015 at 19:53, wrote: > >>>> From: Meador Inge > >>>> > >>>> This patch series opens up the "any" CPU for system-mode and > >>>> adds a new "any" variant named "anyvfp" that initializes the > >>>> FP coprocessors as well. > >>> > >>> We deliberately removed cpu "any" for system mode in > >>> commit f5f6d38b7458b8a back in 2013; I think the rationale > >>> for its removal still holds. If you're emulating a system > >>> you're emulating a specific system and you get a real > >>> CPU. A CPU with no impdef sysregs or initialized feature > >>> and ID registers is broken... > >> > >> You can still have a CPU+RAM only machine model, load elfs and get > >> meaningful result on a debugger. > > > > Yeah, but what does "any" get you over just going ahead > > and specifying your CPU type? What interrupt controller > > should the "any" CPU type have? Generic timers? Etc. > > > > None and none. You are only interested in CPU internal state with no IO at all. Exactly. We have a use-case where QEMU acts as basically an ISS and we only care about architecture level support. So, someone compiles their application with various options (-march=armv7-a, -march=arv5te, etc...) and runs those through GDB that connects to the QEMU GDB stub. From the QEMU side we can launch an instance with '-cpu any' and expect most applications to run on it regardless of how it was built with GCC. This is a reasonable use-case and it is a very small change to QEMU, which introduces hardly any complexity or maintenance burden. > > There isn't zero utility there, but I don't really think > > there's enough to justify cluttering up QEMU with when > > "-cpu cortex-a15" is not very much more to type, and > > has the advantage of being something that actually > > exists in reality. As mentioned above, there is utility and saying that it is "clutter" is a bit of an exaggeration (it is 5 deletions(-) that introduces *one* new option). > > There is a clean definition of an ARM CPU without any IO however which > has utility in compiler testing. I agree. -- Meador