From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Re: [kvm-devel] expose host CPU features to guests Date: Thu, 06 Sep 2007 11:46:07 +0300 Message-ID: <46DFBE4F.5080206@qumranet.com> References: <20070905174530.GA3945@karma.qumranet.com> <46DF04D5.5000807@qumranet.com> <20070905194448.GN5503@redhat.com> <200709060130.03618.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel , qemu-devel@nongnu.org To: Paul Brook Return-path: In-Reply-To: <200709060130.03618.paul@codesourcery.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org Paul Brook wrote: >>> I think qemu-cvs has a -cpu option for non-x86 which could be used for >>> this. Agree machine types are the wrong approach. >>> >> Yep, machine types are already used to switch between a different concept >> so using the new -cpu option would make sense. Could perhaps extend the >> syntax so that instead of '-cpu TYPE' it used '-cpu TYPE,FEATURES' where >> FEATURES was an optional list of CPU features to allow >> > > I tried this for ARM, and having separate type+features isn't worth the > effort. The internal implementation is feature based, but IMHO there's little > benefit exposing that to the user. Just define appropriate CPUs for the > interesting feature combinations. > > The use case is different. We don't care about the actual features, but about finding the greatest common denominator in a virtualization farm. I don't see this as useful for qemu; rather kvm and kqemu. > Of course the x86 emulation doesn't currently support restricting the > architecture features available. To make the --cpu option useful you need to > implement that first. > Applications will not use a feature that is not present in cpuid, so that is not an issue. For the virtualization use case, it is also impossible to turn off support for a feature. -- Any sufficiently difficult bug is indistinguishable from a feature.