From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDuot-0001QQ-J0 for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:18:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDuon-0007gE-Iw for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:18:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDuon-0007g5-9y for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:18:45 -0400 Date: Mon, 26 Aug 2013 14:18:32 +0300 From: Gleb Natapov Message-ID: <20130826111832.GC8218@redhat.com> References: <20130814172604.GC11390@cbox> <04BA3443-74C6-47B9-AABD-30DC200A95A8@suse.de> <20130814173949.GF11390@cbox> <364D0AE6-E3D4-45DE-A484-A37C26726C2D@suse.de> <20130814181817.GH11390@cbox> <09E07C3D-914F-4EF9-BFAE-673B260DF921@suse.de> <20130814182803.GI11390@cbox> <20130825144248.GU8218@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC 0/2] target-arm: Provide '-cpu host' when running KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Patch Tracking , "kvmarm@lists.cs.columbia.edu" , Alexander Graf , Andreas =?utf-8?Q?F=C3=A4rber?= On Sun, Aug 25, 2013 at 04:11:51PM +0100, Peter Maydell wrote: > On 25 August 2013 15:42, Gleb Natapov wrote: > > Are ARM cpu features not enumerable and the only way to know what is > > supported by a core is by its id? I do see feature registers in the > > spec, so why wouldn't we want to be able to disable/enable features > > individually? > > It's complicated. There are feature registers which have various > bits, but only some combinations are architecturally valid. In any > case a guest might reasonably legitimately assume "this is an A15 > so it will have architected timers", for example, and not bother > testing feature bits. That's sad. If feature bit is available I would expect well behaved guest to test it. BTW is there architectural way to tell OS that it runs as a guest? There is dedicated CPUID bit on x86 for that which is obviously never set on real CPUs. > Some feature bits really do have to match the > real hardware, like ones that say "you need to explicitly flush the > branch predictor". A lot are feature bits that are simply mandatory > for any ARMv7 or later processor (which is what you need for KVM > to work at all). What if you want to emulate older arm arch for a guest? > And buried in there might possibly be a few features > that it might actually make sense to enable/disable separately (like > "do we have Neon?"). > > So what we have for now is that the INIT_VCPU ioctl has space > for feature flags (currently unused in v7; in v8 there's a "make the > VM be a 32 bit VM on a 64 bit CPU" flag), so we could wire those > up some day. (We don't have any support in QEMU for saying > "I want an ARM CPU with features X and Y but not Z" yet either.) > Do we have a way to ask KVM if it can support those features? -- Gleb.