From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932457AbcLIEdx (ORCPT ); Thu, 8 Dec 2016 23:33:53 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:34266 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932274AbcLIEdv (ORCPT ); Thu, 8 Dec 2016 23:33:51 -0500 Date: Fri, 9 Dec 2016 05:33:47 +0100 From: Ingo Molnar To: Boris Ostrovsky Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, matt@codeblueprint.co.uk, Linus Torvalds , Andy Lutomirski , Borislav Petkov , Peter Zijlstra , Josh Poimboeuf , Denys Vlasenko , Brian Gerst Subject: Re: [PATCH] x86/head: Refactor 32-bit pgtable setup Message-ID: <20161209043347.GB2595@gmail.com> References: <1481215471-9639-1-git-send-email-boris.ostrovsky@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481215471-9639-1-git-send-email-boris.ostrovsky@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 * Boris Ostrovsky wrote: > The new Xen PVH entry point requires page tables to be setup by the > kernel since it is entered with paging disabled. > > Pull the common code out of head_32.S so that mk_early_pgtbl_32 can be > invoked from both the new Xen entry point and the existing startup_32 > code. > > Convert resulting common code to C. > > Signed-off-by: Boris Ostrovsky > --- > This is replacement for https://lkml.org/lkml/2016/10/14/434, with > assembly code re-written in C as requested by Ingo. > > > arch/x86/include/asm/pgtable_32.h | 32 ++++++++++ > arch/x86/kernel/head32.c | 62 +++++++++++++++++++ > arch/x86/kernel/head_32.S | 122 +++----------------------------------- > 3 files changed, 101 insertions(+), 115 deletions(-) Whee, I love it! And the code is so much more readable! Did you have any particular robustness problems (difficult to resolve crashes) while developing it, or was it reasonably straightforward to do? Thanks, Ingo