xen-devel
[Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetabl
To: |
"H. Peter Anvin" <hpa@xxxxxxxxxxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve |
From: |
Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> |
Date: |
Thu, 14 Apr 2011 12:30:11 +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>, "H. Peter Anvin" <hpa@xxxxxxxxx>, "mingo@xxxxxxx" <mingo@xxxxxxx>, "yinghai@xxxxxxxxxx" <yinghai@xxxxxxxxxx> |
Delivery-date: |
Thu, 14 Apr 2011 04:31:23 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<4DA5EAE4.2060406@xxxxxxxxxxxxxxx> |
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> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
On Wed, 13 Apr 2011, H. Peter Anvin wrote:
> On 04/12/2011 04:19 AM, stefano.stabellini@xxxxxxxxxxxxx wrote:
> > From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> >
> > Introduce a new x86_init hook called pagetable_reserve that during the
> > initial memory mapping is used to reserve a range of memory addresses for
> > kernel pagetable usage.
> >
> > On native it just calls memblock_x86_reserve_range while on xen it also
> > takes care of setting the spare memory previously allocated
> > for kernel pagetable pages from RO to RW, so that it can be used for
> > other purposes.
> >
>
> What are the *semantics* of this hook?
>
> Hooks are insanely nasty if they are just defined by a particular code
> flow, as evidenced by the royal mess called paravirt_ops.
I hope that the other email I have just sent clarifies the purpose of
the hook.
I admit that as it is it wouldn't find much usage outside
init_memory_mapping.
Maybe adding the corresponding hook to allocate the initial kernel
pagetable pages would help generalizing it. Or maybe we just need a
better comment in the code:
/* Reserve the kernel pagetable pages we used and free the other ones so
* that they can be reused for other purposes.
*
* On native it just means calling memblock_x86_reserve_range, on Xen it
* also means marking RW the pagetable pages that we allocated before
* but that haven't been used here.
*/
if (!after_bootmem && pgt_buf_end > pgt_buf_start)
x86_init.mapping.pagetable_reserve(PFN_PHYS(pgt_buf_start),
PFN_PHYS(pgt_buf_end));
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
[Xen-devel] Re: [PATCH 2/4] x86, xen: introduce x86_init.mapping.pagetable_reserve, H. Peter Anvin
- [Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve,
Stefano Stabellini <=
- [Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve, Stefano Stabellini
- [Xen-devel] Re: [PATCH 2/4] x86, xen: introduce x86_init.mapping.pagetable_reserve, H. Peter Anvin
- [Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve, Stefano Stabellini
- [Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve, Stefano Stabellini
- [Xen-devel] Re: [PATCH 2/4] x86, xen: introduce x86_init.mapping.pagetable_reserve, H. Peter Anvin
- [Xen-devel] Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve, Stefano Stabellini
- [Xen-devel] Re: [PATCH 2/4] x86, xen: introduce x86_init.mapping.pagetable_reserve, Jeremy Fitzhardinge
[Xen-devel] [PATCH 1/4] xen: mask_rw_pte mark RO all pagetable pages up to pgt_buf_top, stefano . stabellini
|
|
|