Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755243AbcLSOHx (ORCPT ); Mon, 19 Dec 2016 09:07:53 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:49159 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753990AbcLSOHt (ORCPT ); Mon, 19 Dec 2016 09:07:49 -0500 Subject: Re: [PATCH] x86/head: Refactor 32-bit pgtable setup To: Ingo Molnar References: <1481215471-9639-1-git-send-email-boris.ostrovsky@oracle.com> <20161209043347.GB2595@gmail.com> <17b4298e-f073-d323-3a3f-1974ed3ec62f@oracle.com> <20161218084457.GA19538@gmail.com> 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 From: Boris Ostrovsky Message-ID: Date: Mon, 19 Dec 2016 09:09:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161218084457.GA19538@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1989 Lines: 51 On 12/18/2016 03:44 AM, Ingo Molnar wrote: > * Boris Ostrovsky wrote: > >> On 12/08/2016 11:33 PM, Ingo Molnar wrote: >>> * 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? >> There was nothing particularly difficult beyond understanding current >> code. That, of course, is not to say that there were no crashes but >> developing this on a guest gives you pretty good insight into why/where >> you crashed. >> >> This was tested on bare-metal (in case you are wondering), but obviously >> more testing is always good. > Ok, cool! > > Would you like to carry this with your other Xen dependencies? If yes: > > Acked-by: Ingo Molnar > > If not then I can pick it up and get it to Linus in v4.10. I don't think my series will get into 4.10 since it is has a dependency on hypervisor code that is still being reviewed. If you could take it via your tree it would be great. Thanks! -boris