Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSW1M-0005YS-8B for qemu-devel@nongnu.org; Mon, 11 Aug 2008 07:57:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSW1H-0005QF-Vq for qemu-devel@nongnu.org; Mon, 11 Aug 2008 07:57:07 -0400 Received: from [199.232.76.173] (port=34948 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSW1H-0005Ph-KI for qemu-devel@nongnu.org; Mon, 11 Aug 2008 07:57:03 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:47729) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KSW1H-0002Ie-2i for qemu-devel@nongnu.org; Mon, 11 Aug 2008 07:57:03 -0400 Subject: Re: [Qemu-devel] [PATCH 1/3] [x86] Clean up vendor identification From: Laurent Vivier In-Reply-To: <48A01658.6030308@suse.de> References: <48A01658.6030308@suse.de> Content-Type: text/plain; charset=UTF-8 Date: Mon, 11 Aug 2008 13:56:26 +0200 Message-Id: <1218455786.3871.2.camel@frecb07144> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf Le lundi 11 ao=C3=BBt 2008 =C3=A0 12:37 +0200, Alexander Graf a =C3=A9cri= t : > Right now CPU vendor identification contains a lot of magic numbers. > The=20 > patch cleans them up to defines, so we can identify the CPU later on=20 > without copying magic numbers. >=20 > Signed-off-by: Alexander Graf >=20 >=20 >=20 > diff --git a/qemu/target-i386/cpu.h b/qemu/target-i386/cpu.h > index 7e95900..3c84dc9 100644 > --- a/qemu/target-i386/cpu.h > +++ b/qemu/target-i386/cpu.h > @@ -339,6 +341,14 @@ > #define CPUID_EXT3_IBS (1 << 10) > #define CPUID_EXT3_SKINIT (1 << 12) > =20 > +#define CPUID_VENDOR_INTEL_1 0x756e6547 /* "Genu" */ > +#define CPUID_VENDOR_INTEL_2 0x49656e69 /* "ineI" */ > +#define CPUID_VENDOR_INTEL_3 0x6c65746e /* "ntel" */ > + > +#define CPUID_VENDOR_AMD_1 0x68747541 /* "Auth" */ > +#define CPUID_VENDOR_AMD_2 0x69746e65 /* "enti" */=20 > +#define CPUID_VENDOR_AMD_3 0x444d4163 /* "cAMD" */ if you add "-Wno-multichar" in C flags, you can use: #define CPUID_VENDOR_INTEL_1 'Genu' ... Regards, Laurent --=20 ----------------- Laurent.Vivier@bull.net ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry