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: tim@xen.org, stefano.stabellini@eu.citrix.com,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v2] tools: implement initial ramdisk support for ARM.
Date: Wed, 09 Apr 2014 10:10:30 +0100	[thread overview]
Message-ID: <53450E86.7000905@linaro.org> (raw)
In-Reply-To: <1397032674.31448.16.camel@kazak.uk.xensource.com>



On 09/04/14 09:37, Ian Campbell wrote:
> On Wed, 2014-04-09 at 09:17 +0100, Julien Grall wrote:
>>
>> On 09/04/14 09:12, Ian Campbell wrote:
>>>> This small changes fix boot of the guest with RAM < 128Mb:
>>>>
>>>> diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
>>>> index f051515..2228ba5 100644
>>>> --- a/tools/libxc/xc_dom_arm.c
>>>> +++ b/tools/libxc/xc_dom_arm.c
>>>> @@ -300,7 +300,7 @@ int arch_setup_meminit(struct xc_dom_image *dom)
>>>>        if ( ramend >= ram128mb + modsize && kernend < ram128mb )
>>>>            modbase = ram128mb;
>>>>        else if ( ramend >= kernend + modsize )
>>>> -        modbase = kernend;
>>>> +        modbase = ramend - modsize;
>>>>        else
>>>>            return -1;
>>>>
>>>> I guess this is because the kernel is extracting on it. I think we
>>>> should follow the same "algorithm" as Xen (see place_modules) to decide
>>>> where the modules should be loaded.
>>>
>>> Yes, this fix is correct. The existing code is just bogus, it makes no
>>> sense to place the modules exactly at the end of RAM since they will
>>> spin over the end.
>>
>> I'm not sure to understand why you are talking about RAM... currently
>> the modules are placed just after the kernel (which in this case is
>> always before ramend).
>
> I misread the change.
>
> I think the current code matches the dom0 place_modules call (modulo the
> condition being expressed differently). Perhaps that case is also wrong?

The 2 if of libxc  express the first if of dom0 place_modules, right?

If dom0 as less than 128MB of RAM, we are trying to load the modules as 
high as possible.

In case of the guest, we are loading them just after kernel. But ... the 
kernel will likely decompress on it.

-- 
Julien Grall

  reply	other threads:[~2014-04-09  9:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 13:28 [PATCH v2] tools: implement initial ramdisk support for ARM Ian Campbell
2014-04-04 15:00 ` Ian Jackson
2014-04-04 15:07   ` Ian Campbell
2014-04-04 15:26     ` Ian Jackson
2014-04-08 15:36   ` Ian Campbell
2014-04-08 16:53     ` Ian Jackson
2014-04-08 17:29       ` Julien Grall
2014-04-08 18:20         ` Julien Grall
2014-04-09  8:12           ` Ian Campbell
2014-04-09  8:17             ` Julien Grall
2014-04-09  8:37               ` Ian Campbell
2014-04-09  9:10                 ` Julien Grall [this message]
2014-04-09  9:37                   ` Ian Campbell
2014-04-25 12:31       ` Ian Campbell
2014-04-30 15:11         ` Ian Jackson
2014-05-22 16:07           ` Ian Jackson
2014-04-04 15:16 ` Julien Grall
2014-04-04 15:20   ` Ian Campbell
2014-04-04 15:23     ` Julien Grall
2014-04-08 15:26       ` 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=53450E86.7000905@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.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.