From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVR8j-00055F-G6 for qemu-devel@nongnu.org; Thu, 25 Apr 2013 14:43:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVR8i-0001sS-Dk for qemu-devel@nongnu.org; Thu, 25 Apr 2013 14:43:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVR8i-0001sL-4M for qemu-devel@nongnu.org; Thu, 25 Apr 2013 14:43:28 -0400 From: Eduardo Habkost Date: Thu, 25 Apr 2013 15:43:04 -0300 Message-Id: <1366915386-14728-6-git-send-email-ehabkost@redhat.com> In-Reply-To: <1366915386-14728-1-git-send-email-ehabkost@redhat.com> References: <1366915386-14728-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 5/7] target-i386: n270 can MOVBE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , Richard Henderson , =?UTF-8?q?Andreas=20F=C3=A4rber?= , "H. Peter Anvin" From: Borislav Petkov The Atom core (cpu name "n270" in QEMU speak) supports MOVBE. This is needed when booting 3.8 and later linux kernels built with the MATOM target because we require MOVBE in order to boot properly now. Cc: "H. Peter Anvin" Cc: Richard Henderson Signed-off-by: Borislav Petkov [ehabkost: added compat code to disable MOVBE on pc-*-1.4 and older] Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + target-i386/cpu.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 20708dc..615d8f4 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -237,6 +237,7 @@ static void pc_init_pci(QEMUMachineInitArgs *args) static void pc_init_pci_1_4(QEMUMachineInitArgs *args) { + x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE); pc_init_pci(args); } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7eb4a75..3240203 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -211,6 +211,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args) static void pc_q35_init_1_4(QEMUMachineInitArgs *args) { + x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE); pc_q35_init(args); } diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 8ce088e..592fed8 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -656,7 +656,8 @@ static x86_def_t builtin_x86_defs[] = { /* Some CPUs got no CPUID_SEP */ .features[FEAT_1_ECX] = CPUID_EXT_SSE3 | CPUID_EXT_MONITOR | CPUID_EXT_SSSE3 | - CPUID_EXT_DSCPL | CPUID_EXT_EST | CPUID_EXT_TM2 | CPUID_EXT_XTPR, + CPUID_EXT_DSCPL | CPUID_EXT_EST | CPUID_EXT_TM2 | CPUID_EXT_XTPR | + CPUID_EXT_MOVBE, .features[FEAT_8000_0001_EDX] = (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) | CPUID_EXT2_NX, -- 1.8.1.4