* [PATCH for-4.4] xen/arm: Correctly boot with an initrd and no linux command line
@ 2014-02-10 17:34 Julien Grall
2014-02-10 17:36 ` Julien Grall
0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2014-02-10 17:34 UTC (permalink / raw)
To: xen-devel; +Cc: stefano.stabellini, Julien Grall, tim, ian.campbell
When DOM0 device tree is building, the properties for initrd will
only be added if there is a linux command line. This will result to a panic
later:
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Populate P2M 0x20000000->0x40000000 (1:1 mapping for dom0)
(XEN) Loading kernel from boot module 2
(XEN) Loading zImage from 0000000001000000 to 0000000027c00000-0000000027eafb48
(XEN) Loading dom0 initrd from 0000000002000000 to 0x0000000028200000-0x0000000028c00000
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Cannot fix up "linux,initrd-start" property
(XEN) ****************************************
(XEN)
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
This is a bug fix for Xen 4.4. Without this patch, Xen won't boot with
initrd when the linux command is not set.
---
xen/arch/arm/domain_build.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 47b781b..5ca2f15 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -209,12 +209,15 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
return res;
}
- if ( dt_node_path_is_equal(node, "/chosen") && bootargs )
+ if ( dt_node_path_is_equal(node, "/chosen") )
{
- res = fdt_property(kinfo->fdt, "bootargs", bootargs,
- strlen(bootargs) + 1);
- if ( res )
- return res;
+ if ( bootargs )
+ {
+ res = fdt_property(kinfo->fdt, "bootargs", bootargs,
+ strlen(bootargs) + 1);
+ if ( res )
+ return res;
+ }
/*
* If the bootloader provides an initrd, we must create a placeholder
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH for-4.4] xen/arm: Correctly boot with an initrd and no linux command line
2014-02-10 17:34 [PATCH for-4.4] xen/arm: Correctly boot with an initrd and no linux command line Julien Grall
@ 2014-02-10 17:36 ` Julien Grall
2014-02-10 17:37 ` George Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2014-02-10 17:36 UTC (permalink / raw)
To: Julien Grall
Cc: George Dunlap, xen-devel, tim, ian.campbell, stefano.stabellini
Forget to cc George.
On 02/10/2014 05:34 PM, Julien Grall wrote:
> When DOM0 device tree is building, the properties for initrd will
> only be added if there is a linux command line. This will result to a panic
> later:
>
> (XEN) *** LOADING DOMAIN 0 ***
> (XEN) Populate P2M 0x20000000->0x40000000 (1:1 mapping for dom0)
> (XEN) Loading kernel from boot module 2
> (XEN) Loading zImage from 0000000001000000 to 0000000027c00000-0000000027eafb48
> (XEN) Loading dom0 initrd from 0000000002000000 to 0x0000000028200000-0x0000000028c00000
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Cannot fix up "linux,initrd-start" property
> (XEN) ****************************************
> (XEN)
>
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>
> ---
> This is a bug fix for Xen 4.4. Without this patch, Xen won't boot with
> initrd when the linux command is not set.
> ---
> xen/arch/arm/domain_build.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 47b781b..5ca2f15 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -209,12 +209,15 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
> return res;
> }
>
> - if ( dt_node_path_is_equal(node, "/chosen") && bootargs )
> + if ( dt_node_path_is_equal(node, "/chosen") )
> {
> - res = fdt_property(kinfo->fdt, "bootargs", bootargs,
> - strlen(bootargs) + 1);
> - if ( res )
> - return res;
> + if ( bootargs )
> + {
> + res = fdt_property(kinfo->fdt, "bootargs", bootargs,
> + strlen(bootargs) + 1);
> + if ( res )
> + return res;
> + }
>
> /*
> * If the bootloader provides an initrd, we must create a placeholder
>
--
Julien Grall
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH for-4.4] xen/arm: Correctly boot with an initrd and no linux command line
2014-02-10 17:36 ` Julien Grall
@ 2014-02-10 17:37 ` George Dunlap
2014-02-11 13:07 ` Ian Campbell
0 siblings, 1 reply; 4+ messages in thread
From: George Dunlap @ 2014-02-10 17:37 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, tim, ian.campbell, stefano.stabellini
On 02/10/2014 05:36 PM, Julien Grall wrote:
> Forget to cc George.
>
> On 02/10/2014 05:34 PM, Julien Grall wrote:
>> When DOM0 device tree is building, the properties for initrd will
>> only be added if there is a linux command line. This will result to a panic
>> later:
>>
>> (XEN) *** LOADING DOMAIN 0 ***
>> (XEN) Populate P2M 0x20000000->0x40000000 (1:1 mapping for dom0)
>> (XEN) Loading kernel from boot module 2
>> (XEN) Loading zImage from 0000000001000000 to 0000000027c00000-0000000027eafb48
>> (XEN) Loading dom0 initrd from 0000000002000000 to 0x0000000028200000-0x0000000028c00000
>> (XEN)
>> (XEN) ****************************************
>> (XEN) Panic on CPU 0:
>> (XEN) Cannot fix up "linux,initrd-start" property
>> (XEN) ****************************************
>> (XEN)
>>
>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>>
>> ---
>> This is a bug fix for Xen 4.4. Without this patch, Xen won't boot with
>> initrd when the linux command is not set.
Oops. :-) Looks like a good risk:
Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
>> ---
>> xen/arch/arm/domain_build.c | 13 ++++++++-----
>> 1 file changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>> index 47b781b..5ca2f15 100644
>> --- a/xen/arch/arm/domain_build.c
>> +++ b/xen/arch/arm/domain_build.c
>> @@ -209,12 +209,15 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
>> return res;
>> }
>>
>> - if ( dt_node_path_is_equal(node, "/chosen") && bootargs )
>> + if ( dt_node_path_is_equal(node, "/chosen") )
>> {
>> - res = fdt_property(kinfo->fdt, "bootargs", bootargs,
>> - strlen(bootargs) + 1);
>> - if ( res )
>> - return res;
>> + if ( bootargs )
>> + {
>> + res = fdt_property(kinfo->fdt, "bootargs", bootargs,
>> + strlen(bootargs) + 1);
>> + if ( res )
>> + return res;
>> + }
>>
>> /*
>> * If the bootloader provides an initrd, we must create a placeholder
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH for-4.4] xen/arm: Correctly boot with an initrd and no linux command line
2014-02-10 17:37 ` George Dunlap
@ 2014-02-11 13:07 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2014-02-11 13:07 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel, Julien Grall, tim, stefano.stabellini
On Mon, 2014-02-10 at 17:37 +0000, George Dunlap wrote:
> On 02/10/2014 05:36 PM, Julien Grall wrote:
> > Forget to cc George.
> >
> > On 02/10/2014 05:34 PM, Julien Grall wrote:
> >> When DOM0 device tree is building, the properties for initrd will
> >> only be added if there is a linux command line. This will result to a panic
> >> later:
> >>
> >> (XEN) *** LOADING DOMAIN 0 ***
> >> (XEN) Populate P2M 0x20000000->0x40000000 (1:1 mapping for dom0)
> >> (XEN) Loading kernel from boot module 2
> >> (XEN) Loading zImage from 0000000001000000 to 0000000027c00000-0000000027eafb48
> >> (XEN) Loading dom0 initrd from 0000000002000000 to 0x0000000028200000-0x0000000028c00000
> >> (XEN)
> >> (XEN) ****************************************
> >> (XEN) Panic on CPU 0:
> >> (XEN) Cannot fix up "linux,initrd-start" property
> >> (XEN) ****************************************
> >> (XEN)
> >>
> >> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> >>
> >> ---
> >> This is a bug fix for Xen 4.4. Without this patch, Xen won't boot with
> >> initrd when the linux command is not set.
>
> Oops. :-) Looks like a good risk:
>
> Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked + Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-11 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 17:34 [PATCH for-4.4] xen/arm: Correctly boot with an initrd and no linux command line Julien Grall
2014-02-10 17:36 ` Julien Grall
2014-02-10 17:37 ` George Dunlap
2014-02-11 13:07 ` Ian Campbell
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.