From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH 3/7] xen/mmu: Release the Xen provided L4 (PGD) back.
Date: Fri, 27 Jul 2012 13:35:18 -0400 [thread overview]
Message-ID: <20120727173518.GC17427@andromeda.dapyr.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1207271231560.26163@kaball.uk.xensource.com>
On Fri, Jul 27, 2012 at 12:37:24PM +0100, Stefano Stabellini wrote:
> On Thu, 26 Jul 2012, Konrad Rzeszutek Wilk wrote:
> > Since we are not using it and somebody else could use it.
>
> make sense except it is almost entirely rewritten by the following
> patch...
Yeah, I should squash them.
>
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > ---
> > arch/x86/xen/mmu.c | 13 +++++++------
> > 1 files changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> > index a59070b..48bdc9f 100644
> > --- a/arch/x86/xen/mmu.c
> > +++ b/arch/x86/xen/mmu.c
> > @@ -1782,20 +1782,21 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
> > /* Unpin Xen-provided one */
> > pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd)));
> >
> > - /* Switch over */
> > - pgd = init_level4_pgt;
> > -
> > /*
> > * At this stage there can be no user pgd, and no page
> > * structure to attach it to, so make sure we just set kernel
> > * pgd.
> > */
> > xen_mc_batch();
> > - __xen_write_cr3(true, __pa(pgd));
> > + __xen_write_cr3(true, __pa(init_level4_pgt));
> > xen_mc_issue(PARAVIRT_LAZY_CPU);
> >
> > - memblock_reserve(__pa(xen_start_info->pt_base),
> > - xen_start_info->nr_pt_frames * PAGE_SIZE);
> > + /* Offset by one page since the original pgd is going bye bye */
> > + memblock_reserve(__pa(xen_start_info->pt_base + PAGE_SIZE),
> > + (xen_start_info->nr_pt_frames * PAGE_SIZE) - PAGE_SIZE);
> > + /* and also RW it so it can actually be used. */
> > + set_page_prot(pgd, PAGE_KERNEL);
> > + clear_page(pgd);
> > }
> > #else /* !CONFIG_X86_64 */
> > static RESERVE_BRK_ARRAY(pmd_t, initial_kernel_pmd, PTRS_PER_PMD);
> > --
> > 1.7.7.6
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
> >
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-07-27 17:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 20:47 [RFC PATCH] Boot PV guests with more than 128GB (v1) for 3.7 Konrad Rzeszutek Wilk
2012-07-26 20:47 ` [PATCH 1/7] xen/mmu: use copy_page instead of memcpy Konrad Rzeszutek Wilk
2012-07-27 7:35 ` [Xen-devel] " Jan Beulich
2012-07-26 20:47 ` [PATCH 2/7] xen/mmu: For 64-bit do not call xen_map_identity_early Konrad Rzeszutek Wilk
2012-07-26 20:47 ` [PATCH 3/7] xen/mmu: Release the Xen provided L4 (PGD) back Konrad Rzeszutek Wilk
2012-07-27 11:37 ` [Xen-devel] " Stefano Stabellini
2012-07-27 17:35 ` Konrad Rzeszutek Wilk [this message]
2012-07-26 20:47 ` [PATCH 4/7] xen/mmu: Recycle the Xen provided L4, L3, and L2 pages Konrad Rzeszutek Wilk
2012-07-27 11:45 ` [Xen-devel] " Stefano Stabellini
2012-07-27 17:38 ` Konrad Rzeszutek Wilk
2012-07-31 14:39 ` Konrad Rzeszutek Wilk
2012-07-26 20:47 ` [PATCH 5/7] xen/p2m: Add logic to revector a P2M tree to use __va leafs Konrad Rzeszutek Wilk
2012-07-27 11:18 ` [Xen-devel] " Stefano Stabellini
2012-07-27 11:47 ` Jan Beulich
2012-07-27 17:34 ` Konrad Rzeszutek Wilk
2012-07-30 7:10 ` Jan Beulich
2012-07-26 20:47 ` [PATCH 6/7] xen/mmu: Copy and revector the P2M tree Konrad Rzeszutek Wilk
2012-07-26 20:47 ` [PATCH 7/7] xen/mmu: Remove from __ka space PMD entries for pagetables Konrad Rzeszutek Wilk
2012-07-27 11:31 ` [Xen-devel] " Stefano Stabellini
2012-07-27 17:42 ` Konrad Rzeszutek Wilk
2012-07-31 14:37 ` Konrad Rzeszutek Wilk
2012-07-27 7:34 ` [Xen-devel] [RFC PATCH] Boot PV guests with more than 128GB (v1) for 3.7 Jan Beulich
2012-07-27 10:00 ` Ian Campbell
2012-07-27 10:17 ` Jan Beulich
2012-07-27 10:21 ` Ian Campbell
2012-07-27 10:33 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120727173518.GC17427@andromeda.dapyr.net \
--to=konrad@darnok.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome