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: Roy Franz <roy.franz@linaro.org>,
	stefano.stabellini@eu.citrix.com, tim@xen.org,
	Fu Wei <fu.wei@linaro.org>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: arm: don't release modules which aren't in RAM into the heap
Date: Thu, 24 Jul 2014 14:52:44 +0100	[thread overview]
Message-ID: <53D10FAC.2020204@linaro.org> (raw)
In-Reply-To: <1406198666.555.4.camel@kazak.uk.xensource.com>

Hi Ian,

On 07/24/2014 11:44 AM, Ian Campbell wrote:
> On Thu, 2014-07-24 at 11:40 +0100, Julien Grall wrote:
>>> -        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
> 
> Either we will ignore bank 1, in which case these checks will prevent us
> adding them to the heap or the frame table will span bank0..1 and
> include the hole.
> 
> We don't really handle the latter case very well, but the first one is
> the one which is actually biting people today.

Thanks for the explanation. It might be worse to add a TODO to help the
person who will support sparse frame table.

Anyway:

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

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-07-24 13:52 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
2014-07-24 10:44   ` Ian Campbell
2014-07-24 13:52     ` Julien Grall [this message]
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=53D10FAC.2020204@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=fu.wei@linaro.org \
    --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.