From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752144AbcDZKxX (ORCPT ); Tue, 26 Apr 2016 06:53:23 -0400 Received: from mail.skyhub.de ([78.46.96.112]:42992 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbcDZKxW (ORCPT ); Tue, 26 Apr 2016 06:53:22 -0400 Date: Tue, 26 Apr 2016 12:53:15 +0200 From: Borislav Petkov To: Boris Ostrovsky , "H. Peter Anvin" Cc: Ingo Molnar , Thomas Gleixner , david.vrabel@citrix.com, konrad.wilk@oracle.com, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, roger.pau@citrix.com, mcgrof@suse.com Subject: Re: [PATCH v2 02/11] xen/hvmlite: Bootstrap HVMlite guest Message-ID: <20160426105315.GC17845@pd.tnic> References: <1454341137-14110-1-git-send-email-boris.ostrovsky@oracle.com> <1454341137-14110-3-git-send-email-boris.ostrovsky@oracle.com> <20160424202314.GA3973@pd.tnic> <571E19D7.1080301@oracle.com> <20160425134749.GB28454@pd.tnic> <571E219D.2090308@oracle.com> <20160425141145.GE28454@pd.tnic> <571E2CC7.7080907@oracle.com> <20160425152209.GH28454@pd.tnic> <571E3C43.3010007@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <571E3C43.3010007@oracle.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 25, 2016 at 11:48:19AM -0400, Boris Ostrovsky wrote: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/x86/boot.txt#n1096 > > is what I was referring to. Right, so reportedly those two weren't meant to be entry points initially but stuff is using them (think of boot loaders and kexec, for example) which makes them effectively such. So I guess having one more user wouldn't change anything. However, I'd like to document that fact and make them explicit, see below. Btw, that boot.txt file could use some serious scrubbing, but that's for another day. (Btw 2, that "start address of loaded 64-bit kernel plus 0x200" is simply wrong. The 0x200 offset is for the boot/compressed/ version of startup_64: arch/x86/boot/compressed/head_64.S: ... .code64 .org 0x200 ENTRY(startup_64) --- diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index 9da6f3512249..69ed95784085 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt @@ -1053,9 +1053,9 @@ described in zero-page.txt. After setting up the struct boot_params, the boot loader can load the 32/64-bit kernel in the same way as that of 16-bit boot protocol. -In 32-bit boot protocol, the kernel is started by jumping to the -32-bit kernel entry point, which is the start address of loaded -32/64-bit kernel. +In 32-bit boot protocol, the kernel is started by jumping to the 32-bit +kernel entry point (arch/x86/kernel/head_32.S::startup_32), which is the +start address of loaded 32/64-bit kernel. At entry, the CPU must be in 32-bit protected mode with paging disabled; a GDT must be loaded with the descriptors for selectors @@ -1089,9 +1089,9 @@ After setting up the struct boot_params, the boot loader can load 64-bit kernel in the same way as that of 16-bit boot protocol, but kernel could be loaded above 4G. -In 64-bit boot protocol, the kernel is started by jumping to the -64-bit kernel entry point, which is the start address of loaded -64-bit kernel plus 0x200. +In 64-bit boot protocol, the kernel is started by jumping to the 64-bit +kernel entry point (arch/x86/kernel/head_64.S::startup_64), which is the +start address of loaded 64-bit kernel. At entry, the CPU must be in 64-bit mode with paging enabled. The range with setup_header.init_size from start address of loaded -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.