From patchwork Tue Apr 26 10:53:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 8937731 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 12F079F441 for ; Tue, 26 Apr 2016 10:56:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F17320138 for ; Tue, 26 Apr 2016 10:56:16 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 554012012D for ; Tue, 26 Apr 2016 10:56:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av0cN-0007Hv-3I; Tue, 26 Apr 2016 10:53:23 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av0cM-0007Hj-Gn for xen-devel@lists.xenproject.org; Tue, 26 Apr 2016 10:53:22 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 21/56-25799-1A84F175; Tue, 26 Apr 2016 10:53:21 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRWlGSWpSXmKPExsXip5dQoLvQQz7 c4PVicYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNeP4jt8sBROEKy48P8jawPiNv4uRg0NCQFfi TZ9OFyMXh5DAFkaJ6zvOskE4F5kkVrzdzAZSJCSQIfHiclQXIycHi4CqxK2n01lAbDYBFYmlZ 24xgdgiAsES6x/MA7OZBR4ySmy5ygViCws4SXS8vsgMMoZXQEfiQ7ssxPheZomHn+6wgdTwCg hKnJz5hAWiV13iz7xLYPXMAtISy/9xgIQ5BbQk9p/8xQoSFgVa++pg/QRGgVlImmchaZ6F0Ly AkXkVo0ZxalFZapGuoaleUlFmekZJbmJmjq6hgalebmpxcWJ6ak5iUrFecn7uJkZgWDIAwQ7G hu2ehxglOZiURHn/TJYLF+JLyk+pzEgszogvKs1JLT7EKMPBoSTB6+MuHy4kWJSanlqRlpkDj BCYtAQHj5II70s3oDRvcUFibnFmOkTqFKOilDivIEifAEgiozQPrg0WlZcYZaWEeRmBDhHiKU gtys0sQZV/xSjOwagkzJsHMoUnM68EbvoroMVMQIsvH5IFWVySiJCSamBMZkxKn5Aubv+fUyn rgYFO1N/HlVEL9pct3WT6x8OtcZvbJ+N9XkGuP9/0PrhuVak4OfVw9BcBmZe3Xj/6LRd2a64+ MFzl1ikeW7zwpV/VpmWL+tc8XxX/etHteWzul2YF8S/SVwiTeH8gvfzfeavX8u1Haz6+Przuo I6cw6Zb04O+Zx64GLpaiaU4I9FQi7moOBEAX98gVsUCAAA= X-Env-Sender: bp@alien8.de X-Msg-Ref: server-7.tower-206.messagelabs.com!1461668000!36294637!1 X-Originating-IP: [78.46.96.112] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51040 invoked from network); 26 Apr 2016 10:53:20 -0000 Received: from mail.skyhub.de (HELO mail.skyhub.de) (78.46.96.112) by server-7.tower-206.messagelabs.com with SMTP; 26 Apr 2016 10:53:20 -0000 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de 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 wpDL-xw1PDhT; Tue, 26 Apr 2016 12:53:19 +0200 (CEST) Received: from pd.tnic (p200300454B4F04006593D889C35409AF.dip0.t-ipconnect.de [IPv6:2003:45:4b4f:400:6593:d889:c354:9af]) (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 237031DA24D; Tue, 26 Apr 2016 12:53:19 +0200 (CEST) Received: by pd.tnic (Postfix, from userid 1000) id 02A1C1617B2; Tue, 26 Apr 2016 12:53:15 +0200 (CEST) Date: Tue, 26 Apr 2016 12:53:15 +0200 From: Borislav Petkov To: Boris Ostrovsky , "H. Peter Anvin" 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-Disposition: inline In-Reply-To: <571E3C43.3010007@oracle.com> User-Agent: Mutt/1.5.24 (2015-08-30) Cc: mcgrof@suse.com, linux-kernel@vger.kernel.org, david.vrabel@citrix.com, xen-devel@lists.xenproject.org, Thomas Gleixner , Ingo Molnar , roger.pau@citrix.com Subject: Re: [Xen-devel] [PATCH v2 02/11] xen/hvmlite: Bootstrap HVMlite guest X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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