From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753840AbdJNPiC (ORCPT ); Sat, 14 Oct 2017 11:38:02 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:46331 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbdJNPiA (ORCPT ); Sat, 14 Oct 2017 11:38:00 -0400 X-Google-Smtp-Source: AOwi7QBEz6RKyHv7ayQYyIYSqFhxspHbnZLNlprbxIiaJi7oepPT1/uyUb1K1hs7NyQTay8fXEJ8jA== Date: Sat, 14 Oct 2017 18:37:57 +0300 From: "Kirill A. Shutemov" To: Ingo Molnar Cc: "Kirill A. Shutemov" , Ingo Molnar , Linus Torvalds , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Andy Lutomirski , Cyrill Gorcunov , Borislav Petkov , Andi Kleen , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2, RFC] x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G Message-ID: <20171014153757.wpyzw76cswgw4lym@node.shutemov.name> References: <20171013122345.86304-1-kirill.shutemov@linux.intel.com> <20171014073353.trbh3w4lo7t2njsi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171014073353.trbh3w4lo7t2njsi@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 14, 2017 at 09:33:53AM +0200, Ingo Molnar wrote: > Yeah, so first most of this code should be moved from assembly to C. Any reason > why that cannot be done? Well, we can move a little bit more code into C, like populating the trampoline page, but I don't the think we can move the rest. Switching to compatibility mode is too low-level to be written in C. And we cannot write the trampoline code in C, as it's in 32-bit mode and we wouldn't be able to generate it from C in a sane manner while building 64-bit kernel (we discussed this before). -- Kirill A. Shutemov