Received: from eggs.gnu.org ([208.118.235.92]:56052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjU9F-0004UJ-9w for qemu-devel@nongnu.org; Fri, 14 Dec 2012 07:13:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjU9E-0000jE-84 for qemu-devel@nongnu.org; Fri, 14 Dec 2012 07:13:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjU9D-0000jA-V9 for qemu-devel@nongnu.org; Fri, 14 Dec 2012 07:13:48 -0500 Date: Fri, 14 Dec 2012 10:15:20 -0200 From: Eduardo Habkost Message-ID: <20121214121520.GQ3236@otherpad.lan.raisama.net> References: <1355350946-28010-1-git-send-email-ehabkost@redhat.com> <1355350946-28010-2-git-send-email-ehabkost@redhat.com> <50CB112B.3000803@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <50CB112B.3000803@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/3] target-i386: add EXT2_PPRO_FEATURES #define List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Igor Mammedov , qemu-devel@nongnu.org On Fri, Dec 14, 2012 at 12:44:43PM +0100, Andreas F=E4rber wrote: > Am 12.12.2012 23:22, schrieb Eduardo Habkost: > > Instead of repeating the (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) > > expression everywhere, use EXT2_PPRO_FEATURES. > >=20 > > Signed-off-by: Eduardo Habkost >=20 > Technically this patch looks fine. My dislike for these defines aside, = I > have doubts about the semantics: This is masking out "AMD_ALIASES" > (whatever that is exactly I still need to look up) - doesn't that rathe= r > call for EXT2_PPRO_INTEL_FEATURES or so? (But then again the Pentium Pr= o > was an Intel chip so AMD sounds confusing...) Or does no AMD model > actually inherit those AMD aliases? This at least deserves a mention in > the commit message (no need to resend then). The code is not masking out AMD_ALIASES, it is is the opposite: it's keeping only the AMD_ALIASES bits. CPUID_EXT2_AMD_ALIASES are the bits in cpuid_ext2_features that have to be directly duplicated from cpuid_features, but only on AMD CPUs. Intel CPUs don't have those bit aliases. Anyway, you have a point: I think the #define could be named PPRO_EXT2_FEATURES_AMD instead, to make it clear that those bits make sense only on AMD CPU models. Also: on the models that actually have vendor=3DAMD, we can probably remove those bits entirely from the table, as we now have code that makes sure the feature aliases on cpuid_ext2_features are consistent with cpuid_features. But we still have a few exceptions that have vendor=3DIntel (kvm64, kvm32, and n270), that have to be (carefully) fixe= d later. The main reason I sent this change was to make it easier to automatically line-wrap the feature lists in the code to 80-columns on patch 3/3. I think I will reorder and send the feature-array patch first, and fix the CPUID_EXT2_AMD_ALIASES mess later. --=20 Eduardo