WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetabl

To: "H. Peter Anvin" <hpa@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 18 Apr 2011 18:21:05 +0100
Cc: "jeremy@xxxxxxxx" <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "mingo@xxxxxxx" <mingo@xxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxxxxxxxx>, "yinghai@xxxxxxxxxx" <yinghai@xxxxxxxxxx>
Delivery-date: Mon, 18 Apr 2011 10:21:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DAC4DEF.3090200@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.DEB.2.00.1104121149280.22672@kaball-desktop> <1302607192-21355-2-git-send-email-stefano.stabellini@xxxxxxxxxxxxx> <4DA5EAE4.2060406@xxxxxxxxxxxxxxx> <alpine.DEB.2.00.1104141218110.22672@kaball-desktop> <4DA70A4A.4030805@xxxxxxxxx> <alpine.DEB.2.00.1104141746430.10886@kaball-desktop> <alpine.DEB.2.00.1104181507180.10886@kaball-desktop> <4DAC4DEF.3090200@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Mon, 18 Apr 2011, H. Peter Anvin wrote:
> On 04/18/2011 07:09 AM, Stefano Stabellini wrote:
> > 
> > Sorry, I don't mean to be pushy, it is just that I'll be AFK for 12 days
> > starting from next Friday and I think that this issue should really be
> > fixed in time for the 2.6.39 release, otherwise no 2.6.39 kernels will
> > be able to boot on any xen system.
> 
> YOU STILL HAVEN'T PROPOSED ANY SEMANTICS.
> 
> The semantics of a hook is a description of what the preconditions are,
> what the postconditions are, and what exactly they are allowed or not
> allowed to do.
> 
> This is a real pain to do, *exactly because hooks are a real pain*.
> Most hooks that have been put in has been "oh, just do something at
> point X in the code", which is a case of definition by implementation,
> which is exactly how we ended up with the current mess.
> 


x86_init.mapping.pagetable_setup_start(start, max_end)

    Notifies the subarch that the kernel early startup intends to
    use pages as page table pages.
    These pages will have physical addresses in the range
    start..max_end.

    Can be called multiple times to setup kernel page table pages,
    always in a pair with x86_init.mapping.pagetable_setup_done.
    It must be called before x86_init.paging.pagetable_setup_start().

    Preconditions: no kernel code after the 32-bit kernel entry point
    has hooked any new page table pages into the active page table
    except between a pair of
    x86_init.mapping.pagetable_setup_start and
    x86_init.mapping.pagetable_setup_done.

    Postcondition: pages in the range start..max_end may be used as
    page table pages and hooked into active page tables.
    Pages in this range may NOT be used for any other purpose.


x86_init.mapping.pagetable_setup_done(real_end)

    Notifies the subarch that the initial memory mapping is complete,
    and of the actual range of pages used.

    Preconditions:

    x86_init.mapping.pagetable_setup_start was previously called; the
    arguments to the calls must satisfy start <= real_end <= max_end

    The pages in the range start..real_end have been hooked into the
    active page table.
    The pages in the range real_end..max_end are not currently in use.

    Postconditions:

    Pages in the range real_end..max_end may be used as normal
    memory.

    Pages in the range start..real_end might be hooked into the active
    page table and cannot be used for other purposes.

    New page table pages must be allocated using
    pv_mmu_ops.alloc_pte/pmd/pud.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>