Received: from eggs.gnu.org ([2001:4830:134:3::10]:48526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5yb9-0001RC-KY for qemu-devel@nongnu.org; Fri, 19 Jun 2015 11:52:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5yb5-0000wO-K6 for qemu-devel@nongnu.org; Fri, 19 Jun 2015 11:52:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5yb5-0000w5-EA for qemu-devel@nongnu.org; Fri, 19 Jun 2015 11:52:51 -0400 Date: Fri, 19 Jun 2015 12:52:48 -0300 From: Eduardo Habkost Message-ID: <20150619155248.GP3874@thinpad.lan.raisama.net> References: <1434712840-14373-1-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1434712840-14373-1-git-send-email-rkrcmar@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] target-i386: emulate CPUID level of real hardware List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: pbonzini@redhat.com, bsd@redhat.com, qemu-devel@nongnu.org, rth@twiddle.net On Fri, Jun 19, 2015 at 01:20:40PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99 wro= te: [...] > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > index e142f75649d8..c335e230277b 100644 > --- a/hw/i386/pc_piix.c > +++ b/hw/i386/pc_piix.c > @@ -307,6 +307,24 @@ static void pc_init1(MachineState *machine) > static void pc_compat_2_3(MachineState *machine) > { > savevm_skip_section_footers(); > + > + x86_cpu_compat_set_level("qemu64", 4); > + x86_cpu_compat_set_level("kvm64", 5); > + x86_cpu_compat_set_level("pentium3", 2); > + x86_cpu_compat_set_level("n270", 5); > + x86_cpu_compat_set_level("Conroe", 4); > + x86_cpu_compat_set_level("Penryn", 4); > + x86_cpu_compat_set_level("Nehalem", 4); > + > + x86_cpu_compat_set_xlevel("n270", 0x8000000a); > + x86_cpu_compat_set_xlevel("Penryn", 0x8000000a); > + x86_cpu_compat_set_xlevel("Nehalem", 0x8000000a); > + x86_cpu_compat_set_xlevel("Westmere", 0x8000000a); > + x86_cpu_compat_set_xlevel("SandyBridge", 0x8000000a); > + x86_cpu_compat_set_xlevel("Haswell", 0x8000000a); > + x86_cpu_compat_set_xlevel("Haswell-noTSX", 0x8000000a); > + x86_cpu_compat_set_xlevel("Broadwell", 0x8000000a); > + x86_cpu_compat_set_xlevel("Broadwell-noTSX", 0x8000000a); We can simply use set the "level" and "xlevel" properties on PC_COMPAT_2_3, we don't need the x86_cpu_compat_set_*level() functions. --=20 Eduardo