From patchwork Fri Feb 8 09:30:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 219074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 070842C0090 for ; Fri, 8 Feb 2013 20:30:28 +1100 (EST) Received: from localhost ([::1]:59807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3kHq-0006Mf-AD for incoming@patchwork.ozlabs.org; Fri, 08 Feb 2013 04:30:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3kHg-0006MH-HU for qemu-devel@nongnu.org; Fri, 08 Feb 2013 04:30:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3kHd-00029C-8v for qemu-devel@nongnu.org; Fri, 08 Feb 2013 04:30:16 -0500 Received: from mail.skyhub.de ([78.46.96.112]:38563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3kHc-000264-VN for qemu-devel@nongnu.org; Fri, 08 Feb 2013 04:30:13 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1360315808; bh=gg21N9nmCiALSgcFHo6lMxADzHznKpeI2QOmihYZmwE=; h=From:To:Cc:Subject:Date:Message-Id; b=Lb2K5naJ0nr0IHn/92bLKYVeh8o EhOhMR86XOlGV/IJyCLMhDbhxeMu/R/D0R3Qqg0IRvKRMbXaSe6OElSpIXLncHuPflR Uj9LhZdxRijV5nF9u0Aaa9THpyxxPzGYTFri6/03CSJSMqxtgq5f+iYdBWHLaBsAMF7 cxsAbMxQEI= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PqCoZnx3BwcC; Fri, 8 Feb 2013 10:30:08 +0100 (CET) Received: from liondog.tnic (p5B32D188.dip.t-dialin.net [91.50.209.136]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 7A93E1D9CF2; Fri, 8 Feb 2013 10:30:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1360315808; bh=gg21N9nmCiALSgcFHo6lMxADzHznKpeI2QOmihYZmwE=; h=From:To:Cc:Subject:Date:Message-Id; b=Lb2K5naJ0nr0IHn/92bLKYVeh8o EhOhMR86XOlGV/IJyCLMhDbhxeMu/R/D0R3Qqg0IRvKRMbXaSe6OElSpIXLncHuPflR Uj9LhZdxRijV5nF9u0Aaa9THpyxxPzGYTFri6/03CSJSMqxtgq5f+iYdBWHLaBsAMF7 cxsAbMxQEI= Received: by liondog.tnic (Postfix, from userid 1000) id 187F9101BF5; Fri, 8 Feb 2013 10:30:03 +0100 (CET) From: Borislav Petkov To: qemu-devel@nongnu.org Date: Fri, 8 Feb 2013 10:30:02 +0100 Message-Id: <1360315802-959-1-git-send-email-bp@alien8.de> X-Mailer: git-send-email 1.8.1.2.422.g08c0e7f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 78.46.96.112 Cc: Richard Henderson , Borislav Petkov , "H. Peter Anvin" Subject: [Qemu-devel] [PATCH] target-i386: n270 can MOVBE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- Right, so I was playing with booting MATOM kernels in QEMU. As it turns out, QEMU's n270 model doesn't advertize MOVBE although the real hardware supports it. Quick search pointed me to http://lists.nongnu.org/archive/html/qemu-devel/2013-01/msg04317.html which adds that support, among other things. I've merged Richard's patchset with qemu's current master and after applying this patch below, I can report success booting an MATOM kernel with QEMU. The same kernel boots on the real n270 hardware, btw. target-i386/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 9f38e4435e53..83816edd8410 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -610,7 +610,8 @@ static x86_def_t builtin_x86_defs[] = { CPUID_ACPI | CPUID_SS | CPUID_HT | CPUID_TM | CPUID_PBE, /* Some CPUs got no CPUID_SEP */ .ext_features = 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, .ext2_features = (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) | CPUID_EXT2_NX, .ext3_features = CPUID_EXT3_LAHF_LM,