From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753846Ab2LYLwc (ORCPT ); Tue, 25 Dec 2012 06:52:32 -0500 Received: from mail.skyhub.de ([78.46.96.112]:55440 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753633Ab2LYLw3 (ORCPT ); Tue, 25 Dec 2012 06:52:29 -0500 Date: Tue, 25 Dec 2012 12:52:26 +0100 From: Borislav Petkov To: "H. Peter Anvin" Cc: Konrad Rzeszutek Wilk , Yinghai Lu , Thomas Gleixner , Ingo Molnar , "Eric W. Biederman" , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 00/27] x86, boot, 64bit: Add support for loading ramdisk and bzImage above 4G Message-ID: <20121225115226.GD7720@liondog.tnic> Mail-Followup-To: Borislav Petkov , "H. Peter Anvin" , Konrad Rzeszutek Wilk , Yinghai Lu , Thomas Gleixner , Ingo Molnar , "Eric W. Biederman" , Andrew Morton , linux-kernel@vger.kernel.org References: <1355814959-10573-1-git-send-email-yinghai@kernel.org> <20121222024225.GG3468@phenom.dumpdata.com> <20121222132419.GB2936@phenom.dumpdata.com> <50D8FBF9.6050509@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <50D8FBF9.6050509@zytor.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 24, 2012 at 05:06:01PM -0800, H. Peter Anvin wrote: > Could this be the ljmpq problem that Borislav reported > (Intel implemented ljmpq, AMD didn't, and I was tempted by a > micro-optimization which broke AMD which made it into the patchset)? It has to be. Just booted Yinghai's -v8 in kvm on an AMD host and it worked fine. With the change below it keeps rebooting like I reported earlier. I'd go out on a limb here and guess that the guest is triple-faulting due to an unhandled #GP caused by an invalid opcode or similar. --- diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index d94f6d68be2a..1842d30c96a2 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -279,11 +279,8 @@ ENTRY(secondary_startup_64) * REX.W + FF /5 JMP m16:64 Jump far, absolute indirect, * address given in m16:64. */ - movq initial_code(%rip),%rax pushq $0 # fake return address to stop unwinder - pushq $__KERNEL_CS # set correct cs - pushq %rax # target address in negative space - lretq + rex64 ljmp *initial_code(%rip) #ifdef CONFIG_HOTPLUG_CPU /* -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --