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, Fu Wei <fu.wei@linaro.org>,
	stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] xen: arm: don't release modules which aren't in RAM into the heap
Date: Thu, 24 Jul 2014 11:40:49 +0100	[thread overview]
Message-ID: <53D0E2B1.2040708@linaro.org> (raw)
In-Reply-To: <0dddfee6c0817bd548ed4f8c69d7032455eec5a9.1406133930.git.ian.campbell@citrix.com>

Hi Ian,

On 23/07/14 17:45, Ian Campbell wrote:
> They might be in e.g. flash or something but more likely they could
> bein a bank of RAM which we aren't handling or in RAM which the

being?

> bootloader hasn't told us about for some reason.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Fu Wei <fu.wei@linaro.org>
> Cc: Roy Franz <roy.franz@linaro.org>
> ---
>   xen/arch/arm/setup.c |    9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index e53e491..446b4dc 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -247,8 +247,13 @@ void __init discard_initial_modules(void)
>           paddr_t s = mi->module[i].start;
>           paddr_t e = s + PAGE_ALIGN(mi->module[i].size);
>
> -        if ( mi->module[i].kind != BOOTMOD_XEN )
> -            dt_unreserved_regions(s, e, init_domheap_pages, 0);
> +        if ( mi->module[i].kind == BOOTMOD_XEN )
> +            continue;
> +
> +        if ( !mfn_valid(paddr_to_pfn(s)) || !mfn_valid(paddr_to_pfn(e)))
> +            continue;

What happen if the bootloader decide to put the module between 2 banks 
and having the hole in the middle. Such as:

start of the module

end of bank 0

hole

start of bank 1

end of the module

Regards,

-- 
Julien Grall

  parent reply	other threads:[~2014-07-24 10:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 16:45 [PATCH] xen: arm: don't release modules which aren't in RAM into the heap Ian Campbell
2014-07-23 16:48 ` Roy Franz
2014-07-24 10:40 ` Julien Grall [this message]
2014-07-24 10:44   ` Ian Campbell
2014-07-24 13:52     ` Julien Grall
2014-07-24 15:54   ` Ian Campbell
2014-08-05  0:16     ` Roy Franz
2014-08-06  3:07       ` Roy Franz
2014-08-06  9:37         ` Stefano Stabellini

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=53D0E2B1.2040708@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=fu.wei@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=roy.franz@linaro.org \
    --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.