Received: from eggs.gnu.org ([2001:4830:134:3::10]:59206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwxiq-0002Aw-4p for qemu-devel@nongnu.org; Fri, 05 Dec 2014 13:35:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xwxij-0002HY-V6 for qemu-devel@nongnu.org; Fri, 05 Dec 2014 13:35:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwxij-0002Gi-Nh for qemu-devel@nongnu.org; Fri, 05 Dec 2014 13:35:13 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sB5IZDUw015850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 5 Dec 2014 13:35:13 -0500 Date: Fri, 5 Dec 2014 16:35:11 -0200 From: Eduardo Habkost Message-ID: <20141205183511.GF5002@thinpad.lan.raisama.net> References: <1417801466-23485-1-git-send-email-pbonzini@redhat.com> <1417801466-23485-4-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1417801466-23485-4-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/4] target-i386: add f16c and rdrand to Haswell and Broadwell List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Fri, Dec 05, 2014 at 06:44:25PM +0100, Paolo Bonzini wrote: > Both were added in Ivy Bridge (for which we do not have a CPU model > yet!). > > Signed-off-by: Paolo Bonzini > --- > hw/i386/pc_piix.c | 4 ++++ > hw/i386/pc_q35.c | 4 ++++ > target-i386/cpu.c | 4 ++-- > 3 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > index 3f1524e..cd9f917 100644 > --- a/hw/i386/pc_piix.c > +++ b/hw/i386/pc_piix.c > @@ -320,6 +320,10 @@ static void pc_compat_2_2(MachineState *machine) > x86_cpu_compat_set_features("Opteron_G3", FEAT_1_ECX, CPUID_EXT_VME, 0); > x86_cpu_compat_set_features("Opteron_G4", FEAT_1_ECX, CPUID_EXT_VME, 0); > x86_cpu_compat_set_features("Opteron_G5", FEAT_1_ECX, CPUID_EXT_VME, 0); > + x86_cpu_compat_set_features("Haswell", FEAT_1_ECX, CPUID_EXT_F16C, 0); > + x86_cpu_compat_set_features("Haswell", FEAT_1_ECX, CPUID_EXT_RDRAND, 0); > + x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, CPUID_EXT_F16C, 0); > + x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, CPUID_EXT_RDRAND, 0); The feature should be removed on older machine-types, not added. This should be: x86_cpu_compat_set_features(MODEL, FEAT_1_ECX, 0, CPUID_EXT_...) (You can also use CPUID_EXT_F16C|CPUID_EXT_RDRAND in a single x86_cpu_compat_set_features() call) -- Eduardo