Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756504AbcJNTSC convert rfc822-to-8bit (ORCPT ); Fri, 14 Oct 2016 15:18:02 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:38372 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753144AbcJNTRY (ORCPT ); Fri, 14 Oct 2016 15:17:24 -0400 Subject: Re: [PATCH 2/8] x86/head: Refactor 32-bit pgtable setup To: hpa@zytor.com, david.vrabel@citrix.com, JGross@suse.com References: <1476468318-24422-1-git-send-email-boris.ostrovsky@oracle.com> <1476468318-24422-3-git-send-email-boris.ostrovsky@oracle.com> <119777C5-564B-4171-9452-3E216BC7442E@zytor.com> <1325167d-34fa-2ea1-e9c5-8e9fc727a363@oracle.com> Cc: roger.pau@citrix.com, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Thomas Gleixner , Ingo Molnar , x86@kernel.org, Matt Fleming From: Boris Ostrovsky Message-ID: Date: Fri, 14 Oct 2016 15:18:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: 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 Content-Length: 1290 Lines: 38 On 10/14/2016 03:04 PM, hpa@zytor.com wrote: > On October 14, 2016 11:44:18 AM PDT, Boris Ostrovsky wrote: >> On 10/14/2016 02:31 PM, hpa@zytor.com wrote: >>> On October 14, 2016 11:05:12 AM PDT, 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. >>>> >>> And why does it need a separate entry point as opposed to the plain >> one? >> >> One reason is that we need to prepare boot_params before jumping to >> startup_{32|64}. >> >> When the guest is loaded (always in 32-bit mode) the only thing we have >> is a pointer to Xen-specific datastructure. The early PVH code will >> prepare zeropage based on that structure and then jump to regular >> startup_*() code. >> >> -boris > And why not just resume execution at start_32 then? I am not sure what start_32 is. If you meant startup_32 then that's exactly what we do (for 32-bit guests) once zeropage is set up. -boris -boris