lkml.org 
[lkml]   [2012]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 00/27] x86, boot, 64bit: Add support for loading ramdisk and bzImage above 4G
From
Date
Right, it's the ljmpq issue.

Borislav Petkov <bp@alien8.de> wrote:

>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
> /*

--
Sent from my mobile phone. Please excuse brevity and lack of formatting.


\
 
 \ /
  Last update: 2012-12-25 17:01    [W:0.077 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site