Received: from eggs.gnu.org ([208.118.235.92]:41362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtS4O-00005W-6Z for qemu-devel@nongnu.org; Thu, 10 Jan 2013 19:02:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtS4N-0001Zy-0B for qemu-devel@nongnu.org; Thu, 10 Jan 2013 19:02:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtS4M-0001Zt-Oi for qemu-devel@nongnu.org; Thu, 10 Jan 2013 19:01:58 -0500 Date: Thu, 10 Jan 2013 22:03:39 -0200 From: Eduardo Habkost Message-ID: <20130111000339.GG10683@otherpad.lan.raisama.net> References: <1357757632-1950-1-git-send-email-ehabkost@redhat.com> <1357757632-1950-3-git-send-email-ehabkost@redhat.com> <20130111000740.774084f3@thinkpad.mammed.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130111000740.774084f3@thinkpad.mammed.net> Subject: Re: [Qemu-devel] [RFC 02/12] target-i386: Don't set any KVM flag by default if KVM is disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: kvm@vger.kernel.org, Gleb Natapov , "Michael S. Tsirkin" , Marcelo Tosatti , qemu-devel@nongnu.org, Andreas =?iso-8859-1?Q?F=E4rber?= On Fri, Jan 11, 2013 at 12:07:40AM +0100, Igor Mammedov wrote: [...] > > @@ -1343,13 +1337,15 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features) > > unsigned int i; > > char *featurestr; /* Single 'key=value" string being parsed */ > > /* Features to be added */ > > - FeatureWordArray plus_features = { > > - [FEAT_KVM] = kvm_default_features, > > - }; > > + FeatureWordArray plus_features = { 0 }; > > /* Features to be removed */ > > FeatureWordArray minus_features = { 0 }; > > uint32_t numvalue; > > > > + if (kvm_enabled()) { > > + plus_features[FEAT_KVM] = kvm_default_features; > > + } > While touching it please move setting defaults to cpu_x86_register() or > cpu_x86_find_by_name() to so that cpu_x86_parse_featurestr() would deal only > with custom settings. OK, I will do it in the next version. -- Eduardo