All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH 3/3] Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround"
Date: Fri, 04 Apr 2014 15:48:18 +0100	[thread overview]
Message-ID: <533EC632.1020308@linaro.org> (raw)
In-Reply-To: <1396616219-32219-3-git-send-email-ian.campbell@citrix.com>

Hi Ian,

On 04/04/2014 01:56 PM, Ian Campbell wrote:
> This reverts commit 6c21cb36e263de2db8716b477157a5b6cd531e1e.
> 
> The Linux = issue which this works around was fixed in v3.13 via f52bb722547f
> "ARM: mm: Correct virt_to_phys patching for 64 bit physical addresses".
> 
> This is the second attempt to revert this. Now that we have fixed
> allocate_memory_11 to allocate accessible memory on 32-bit this is safe to do.
> This is not quite a straight revert since we need to ensure that for 32-bit
> domain 0 we do not allocate dom0's memory above 4GB where the domain cannot
> access it without paging (which is disabled at start of day) and LPAE (which
> the kernel may not support) enabled.

When multiple banks will be supported, I guess it will be safe to
allocate above 32bits (if dom0 has more than 4G) of RAM.

Anyway, it's not the goal of this patch :).

>  xen/arch/arm/domain_build.c |   16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 4d6b26b..e7cc2c9 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -69,19 +69,21 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
>  {
>      paddr_t start;
>      paddr_t size;
> -    struct page_info *pg = NULL;
> +    struct page_info *pg;
>      unsigned int order = get_order_from_bytes(dom0_mem);
>      int res;
>      paddr_t spfn;
> -    unsigned int bits;
>  
> -    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
> +    if ( is_32bit_domain(d) )
>      {
> -        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
> -        if ( pg != NULL )
> -            break;
> +        printk("32 bit domain\n");

[..]

> +        printk("64 bit domain\n");

Can you be more explicit on both of theses messages? Nothing specify we
are allocate memory before them.

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-04-04 14:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 12:56 [PATCH 0/3] Really revert xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround Ian Campbell
2014-04-04 12:56 ` [PATCH 1/3] xen: arm: refactor struct kernel_info Ian Campbell
2014-04-04 14:33   ` Julien Grall
2014-04-04 12:56 ` [PATCH 2/3] xen: arm: probe the kernel to determine the guest type earlier Ian Campbell
2014-04-04 14:44   ` Julien Grall
2014-04-04 12:56 ` [PATCH 3/3] Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround" Ian Campbell
2014-04-04 14:48   ` Julien Grall [this message]
2014-04-04 14:52     ` Ian Campbell
2014-04-04 15:03       ` Julien Grall
2014-04-16 16:29 ` [PATCH 0/3] Really revert xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround Ian Campbell

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=533EC632.1020308@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --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.