All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: Roy Franz <roy.franz@linaro.org>,
	tim@xen.org, Vijay Kilari <vijay.kilari@gmail.com>,
	Suravee Suthikulanit <suravee.suthikulpanit@amd.com>,
	stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH FOR-4.5] xen: arm64: Handle memory banks which are not 1GB aligned
Date: Mon, 13 Oct 2014 14:09:10 +0100	[thread overview]
Message-ID: <543BCEF6.80800@linaro.org> (raw)
In-Reply-To: <1412952194-3595-1-git-send-email-ian.campbell@citrix.com>

Hi Ian,

On 10/10/2014 03:43 PM, Ian Campbell wrote:
> The code in the arm64 version of setup_xenheap_mappings was making
> some very confused attempts to handle this but was bogus.
> 
> As well as adjusting the mapping to start on a 1GB boundary we also
> need to account for the offset between the start of the mapping and
> the actual start of the heap when converting between page pointers,
> virtual addresses and machine addresses.
> 
> I preferred to do this by explicitly accounting for the offset rather
> than adding an offset to the frametable because that approach could
> potentially waste a large amount of frametable (up to just less than
> 1GB worth) but also because of issues with converting mfns from
> outside the regions considered for pdx initialisation (which are not
> 1GB aligned) back and forth.
> 
> We already have an idea of the distinction between the start of the
> direct map and the start of the xenheap in the difference between
> DIRECTMAP_VIRT_START and XENHEAP_VIRT_START. Until now these were the
> same thing, but now we change XENHEAP_VIRT_START to point to the
> actual start of heap not the mapping. Surprisingly there was only one
> place which was using the conceptually wrong value.
> 
> Also change xenheap_virt_end to a vaddr_t for consistency.
> 
> We've been lucky so far that most hardware happens to locate memory
> on a 1GB boundary (we did have reports of a system with memory at a
> half gig boundary which exhibited failures which I didn't manage to
> follow up on successfully). The EFI support has exposed this
> shortcoming by the way it handles reserved memory, which has a
> similar effect to having memory non-1GB aligned.
> 
> arm32 does things differently here due to using a small Xen heap and
> a demand mapped domain heap, so isn't affected.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
> Cc: Roy Franz <roy.franz@linaro.org>
> Cc: Vijay Kilari <vijay.kilari@gmail.com>
> ---
> FOR-4.5: This is a bug fix.

Looks good to me:

Reviewed-by: Julien Grall <julien.grall@linaro.org>

Regards,

-- 
Julien Grall

  parent reply	other threads:[~2014-10-13 13:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10 14:43 [PATCH FOR-4.5] xen: arm64: Handle memory banks which are not 1GB aligned Ian Campbell
2014-10-10 19:12 ` Roy Franz
2014-10-14 10:59   ` Ian Campbell
2014-10-11  0:28 ` Suravee Suthikulanit
2014-10-13 12:35   ` Vijay Kilari
2014-10-13 12:45     ` Julien Grall
2014-10-13 13:09 ` Julien Grall [this message]
2014-10-13 15:57 ` Suravee Suthikulanit

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=543BCEF6.80800@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=roy.franz@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --cc=vijay.kilari@gmail.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.