Received: from eggs.gnu.org ([208.118.235.92]:46917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN7rG-0005pl-T2 for qemu-devel@nongnu.org; Tue, 02 Apr 2013 16:31:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UN7rB-0008Fx-GJ for qemu-devel@nongnu.org; Tue, 02 Apr 2013 16:31:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN7rB-0008Fg-8t for qemu-devel@nongnu.org; Tue, 02 Apr 2013 16:31:01 -0400 Date: Tue, 2 Apr 2013 17:30:57 -0300 From: Eduardo Habkost Message-ID: <20130402203057.GC6862@otherpad.lan.raisama.net> References: <1357870231-26762-1-git-send-email-imammedo@redhat.com> <1357870231-26762-4-git-send-email-imammedo@redhat.com> <20130111022550.GK10683@otherpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130111022550.GK10683@otherpad.lan.raisama.net> Subject: Re: [Qemu-devel] [PATCH 03/17] target-i386: move kvm_check_features_against_host() check to realize time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, afaerber@suse.de On Fri, Jan 11, 2013 at 12:25:50AM -0200, Eduardo Habkost wrote: > On Fri, Jan 11, 2013 at 03:10:17AM +0100, Igor Mammedov wrote: > > kvm_check_features_against_host() should be called when features can't be > > changed and when features are convereted to properties it would be possible to > > change them until realize time, so correct way is to call > > kvm_check_features_against_host() in x86_cpu_realize() > > > > Signed-off-by: Igor Mammedov > > Reviewed-by: Eduardo Habkost Oops, I missed a problem on this patch: > [...] > > @@ -2177,6 +2174,11 @@ void x86_cpu_realize(Object *obj, Error **errp) > > #ifdef CONFIG_KVM > > filter_features_for_kvm(cpu); > > #endif > > + if (check_cpuid && kvm_check_features_against_host(cpu) > > + && enforce_cpuid) { > > + error_setg(errp, "Host's CPU doesn't support requested features"); > > + return; > > + } Checking kvm_check_features_against_host() after filter_features_for_kvm() is useless, as filter_features_for_kvm() will have filtered out everything that is not supported by the host, already. This patch broke "-cpu enforce" on v1.4.0. I will send a fix soon. -- Eduardo