From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754579AbbKRL3A (ORCPT ); Wed, 18 Nov 2015 06:29:00 -0500 Received: from mail.skyhub.de ([78.46.96.112]:42908 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbbKRL27 (ORCPT ); Wed, 18 Nov 2015 06:28:59 -0500 Date: Wed, 18 Nov 2015 12:28:46 +0100 From: Borislav Petkov To: Paolo Bonzini Cc: LKML , X86 ML , KVM Subject: Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation Message-ID: <20151118112846.GD4138@pd.tnic> References: <1447497436-26424-1-git-send-email-bp@alien8.de> <1447497436-26424-2-git-send-email-bp@alien8.de> <564C5C90.3080903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <564C5C90.3080903@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2015 at 12:10:08PM +0100, Paolo Bonzini wrote: > On 14/11/2015 11:37, Borislav Petkov wrote: > > vendor = x86_vendor(); > > - family = x86_family(); > > + family = x86_family_cpuid(); > > What about renaming x86_vendor() so that this looks like > > - vendor = x86_vendor(); > - family = x86_family(); > + vendor = x86_cpuid_vendor(); > + family = x86_cpuid_family(); The idea is that x86_family_cpuid() gives the family *after* having executed CPUID while x86_family() only computes the family from a supplied CPUID_1_EAX. I.e., the last saves us the CPUID call. Hmm, maybe I should make that more clear ... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.