Received: from eggs.gnu.org ([208.118.235.92]:58751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXvkK-00030A-Bq for qemu-devel@nongnu.org; Thu, 02 May 2013 11:48:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXvkC-0008H9-HN for qemu-devel@nongnu.org; Thu, 02 May 2013 11:48:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXvkC-0008H3-9E for qemu-devel@nongnu.org; Thu, 02 May 2013 11:48:28 -0400 Date: Thu, 2 May 2013 12:48:25 -0300 From: Eduardo Habkost Message-ID: <20130502154825.GP28606@otherpad.lan.raisama.net> References: <1367424440-16687-1-git-send-email-afaerber@suse.de> <1367424440-16687-5-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1367424440-16687-5-git-send-email-afaerber@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu for-1.5 4/4] target-i386: Change CPUID model of 486 to 8 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: imammedo@redhat.com, "H. Peter Anvin" , qemu-devel@nongnu.org, anthony@codemonkey.ws, pbonzini@redhat.com On Wed, May 01, 2013 at 06:07:20PM +0200, Andreas F=E4rber wrote: > This changes the model number of 486 to 8 (DX4) which matches the > feature set presented, and actually has the CPUID instruction. >=20 > This adds a compatibility property, to keep model=3D0 on pc-*-1.4 and o= lder. >=20 > Signed-off-by: H. Peter Anvin > Cc: Eduardo Habkost > [AF: Add compat_props entry] > Signed-off-by: Andreas F=E4rber Tested by running a simple CPUID-dump test kernel, CPUID data is changing according to the machine-type as expected. Didn't test using a Linux kernel. Tested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost > --- > include/hw/i386/pc.h | 4 ++++ > target-i386/cpu.c | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index 41869e5..417afe4 100644 > --- a/include/hw/i386/pc.h > +++ b/include/hw/i386/pc.h > @@ -242,6 +242,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t); > .driver =3D "pc-sysfw",\ > .property =3D "rom_only",\ > .value =3D stringify(0),\ > + },{\ > + .driver =3D "486-" TYPE_X86_CPU,\ > + .property =3D "model",\ > + .value =3D stringify(0),\ > } > =20 > #endif > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 8a9563b..f7d4d9b 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -550,7 +550,7 @@ static x86_def_t builtin_x86_defs[] =3D { > .level =3D 1, > .vendor =3D CPUID_VENDOR_INTEL, > .family =3D 4, > - .model =3D 0, > + .model =3D 8, > .stepping =3D 0, > .features =3D I486_FEATURES, > .xlevel =3D 0, > --=20 > 1.8.1.4 >=20 --=20 Eduardo