Received: from eggs.gnu.org ([208.118.235.92]:52960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttdll-0005O1-Ht for qemu-devel@nongnu.org; Fri, 11 Jan 2013 07:31:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ttdlh-0001aS-2U for qemu-devel@nongnu.org; Fri, 11 Jan 2013 07:31:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:19816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttdlg-0001aG-Qj for qemu-devel@nongnu.org; Fri, 11 Jan 2013 07:31:29 -0500 Date: Fri, 11 Jan 2013 10:06:35 -0200 From: Eduardo Habkost Message-ID: <20130111120635.GP10683@otherpad.lan.raisama.net> References: <1357870231-26762-1-git-send-email-imammedo@redhat.com> <1357870231-26762-7-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1357870231-26762-7-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH 06/17] target-i386: remove vendor_override field from CPUX86State 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 03:10:20AM +0100, Igor Mammedov wrote: > commit 8935499831312 makes cpuid return to guest host's vendor value > instead of built-in one by default if kvm_enabled() == true and allows > to override this behavior if 'vendor' is specified on -cpu command line. > > But every time guest calls cpuid to get 'vendor' value, host's value is > read again and again in default case. > > It complicates semantic of vendor property and makes it harder to use. > > Instead of reading 'vendor' value from host every time cpuid[vendor] is > called, override 'vendor' value only once in cpu_x86_find_by_name(), when > built-in CPU model is found and if(kvm_enabled() == true). > > It provides the same default semantic > if (kvm_enabled() == true) vendor = host's vendor > else vendor = built-in vendor > > and then later: > if (custom vendor) vendor = custom vendor > > 'vendor' value is overridden when user provides it on -cpu command line, > and there isn't need in vendor_override field anymore, remove it. > > Signed-off-by: Igor Mammedov In case my previous reviewed-by line (buried in the discussion about property defaults) was missed: Reviewed-by: Eduardo Habkost > --- > v4: > - rebased with "target-i386: move out CPU features initialization > in separate func" dropped. So remove vendor_override in > cpu_x86_register() instead. > - replace x86cpu_vendor_words2str() with x86_cpu_vendor_words2str() > due to renaming of the last in previous patch > --- > target-i386/cpu.c | 27 ++++++++++++--------------- > target-i386/cpu.h | 1 - > 2 files changed, 12 insertions(+), 16 deletions(-) > [...] -- Eduardo