From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757434AbcLBTsc convert rfc822-to-8bit (ORCPT ); Fri, 2 Dec 2016 14:48:32 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:35989 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753222AbcLBTs2 (ORCPT ); Fri, 2 Dec 2016 14:48:28 -0500 Subject: Re: [PATCH 2/8] x86/head: Refactor 32-bit pgtable setup To: hpa@zytor.com, Ingo Molnar References: <1476468318-24422-1-git-send-email-boris.ostrovsky@oracle.com> <1476468318-24422-3-git-send-email-boris.ostrovsky@oracle.com> <0b9894e4-753c-7e49-45a7-3ee5e82abe3e@oracle.com> <03294a9e-63b2-3cea-2dfe-808190f6fa0e@oracle.com> <20161202094554.GA28775@gmail.com> <20161202160855.GA3307@gmail.com> <3F5DA9BC-52BF-4025-AAB9-24C943BDB711@zytor.com> Cc: Thomas Gleixner , Ingo Molnar , david.vrabel@citrix.com, JGross@suse.com, roger.pau@citrix.com, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org, Matt Fleming From: Boris Ostrovsky Message-ID: Date: Fri, 2 Dec 2016 14:49:01 -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: <3F5DA9BC-52BF-4025-AAB9-24C943BDB711@zytor.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/02/2016 12:52 PM, hpa@zytor.com wrote: > On December 2, 2016 8:08:55 AM PST, Ingo Molnar wrote: >> * Boris Ostrovsky wrote: >> >>> On 12/02/2016 04:45 AM, Ingo Molnar wrote: >>>> * Boris Ostrovsky wrote: >>>> >>>>> On 10/31/2016 08:33 AM, Boris Ostrovsky wrote: >>>>>> On 10/14/2016 02:05 PM, Boris Ostrovsky wrote: >>>>>>> From: Matt Fleming >>>>>>> >>>>>>> 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 and into pgtable_32.S so >> that >>>>>>> setup_pgtable_32 can be invoked from both the new Xen entry >> point and >>>>>>> the existing startup_32 code. >>>>>> Ping to x86 maintainers. >>>>> Pinging again. >>>>> >>>>> I will be re-sending this series at some point (it has been >> delayed by >>>>> some hypervisor changes that will be needed) but I'd like to hear >> from >>>>> x86 maintainers whether this will be acceptable before I post this >> again. >>>> Could this be done in C? >>> I suppose it could be, I haven't thought about it. >>> >>> The goal here was to simply make existing startup code available to >> others (Xen >>> guest) without changes. Are you suggesting to build page tables in C >> for the Xen >>> guest only or to make startup_32 call new C code as well? >> My suggestion would be to transform the factored out assembly code to >> C. >> >> Thanks, >> >> Ingo > It is tricky to do so safely, because at this stage almost nothing of the C execution environment has been set up. I can still give it a try but I'd rather not tie it to this (Xen PVH) patch series. Which would leave me with two options: either keep what this patch does, leaving it as assembly (requires your ack), or have Xen code build the pages on its own. -boris