All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: vijay.kilari@gmail.com
Cc: stefano.stabellini@eu.citrix.com,
	Prasun.Kapoor@caviumnetworks.com,
	vijaya.kumar@caviumnetworks.com, julien.grall@linaro.org,
	tim@xen.org, xen-devel@lists.xen.org,
	stefano.stabellini@citrix.com, jbeulich@suse.com,
	manish.jaggi@caviumnetworks.com
Subject: Re: [PATCH v4] xen/arm: Add RESERVE option to reserve non-leaf level table entries
Date: Tue, 24 Mar 2015 16:53:58 +0000	[thread overview]
Message-ID: <1427216038.21742.457.camel@citrix.com> (raw)
In-Reply-To: <1427197487-8216-1-git-send-email-vijay.kilari@gmail.com>

On Tue, 2015-03-24 at 17:14 +0530, vijay.kilari@gmail.com wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> 
> On x86, for the pages mapped with PAGE_HYPERVISOR attribute
> non-leaf page tables are allocated with valid pte entries.
> and with MAP_SMALL_PAGES attribute only non-leaf page tables are
> allocated with invalid (valid bit set to 0) pte entries.
> However on arm this is not the case. On arm for the pages
> mapped with PAGE_HYPERVISOR and MAP_SMALL_PAGES both
> non-leaf and leaf level page table are allocated with valid bit
> in pte entries.
> 
> This behaviour in arm makes common vmap code fail to
> allocate memory beyond 128MB as described below.
> 
> In vm_init, map_pages_to_xen() is called for mapping
> vm_bitmap. Initially one page of vm_bitmap is allocated
> and mapped using PAGE_HYPERVISOR attribute.
> For the rest of vm_bitmap pages, MAP_SMALL_PAGES attribute
> is used to map.
> 
> In ARM for both PAGE_HYPERVISOR and MAP_SMALL_PAGES, valid bit
> is set to 1 in pte entry for these mapping.
> 
> In vm_alloc(), map_pages_to_xen() is failing for >128MB because
> for this next vm_bitmap page the mapping is already set in vm_init()
> with valid bit set in pte entry. So map_pages_to_xen() in
> ARM returns error.
> 
> With this patch, MAP_SMALL_PAGES is dropped and arch specific
> populate_pt_range() api is introduced to populate non-leaf
> page table entries for the requested pages. Added RESERVE option
> to map non-leaf page table entries.
> 
> Signed-off-by: Vijaya Kumar K<Vijaya.Kumar@caviumnetworks.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Acked + applied, thanks.

I changed the title to the more complete/correct: "xen: Add
populate_pt_range interface to reserve non-leaf level table entries". I
hope that is OK.

Ian.

      reply	other threads:[~2015-03-24 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 11:44 [PATCH v4] xen/arm: Add RESERVE option to reserve non-leaf level table entries vijay.kilari
2015-03-24 16:53 ` Ian Campbell [this message]

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=1427216038.21742.457.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@linaro.org \
    --cc=manish.jaggi@caviumnetworks.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=vijay.kilari@gmail.com \
    --cc=vijaya.kumar@caviumnetworks.com \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.