tools: implement initial ramdisk support for ARM.
PATCH v2 1/1 tools: implement initial ramdisk support for ARM.
The ramdisk is passed to the kernel as a property in the chosen node of the device tree. This is somewhat tricky since in order to place the ramdisk and dtb in ram we first need to know the size of the dtb. So we initially create a DTB with placeholders for the ramdisk and finalise the value (which doesn't change the size) once we know where everything is.
Rename libxl__arch_domain_configure to xl__arch_domain_init_hw_description to better reflect its use and to be consistent with the new libxl__arch_domain_finalise_hw_description.
The common xc_dom_build_image() function did not support explicit placement of the ramdisk, instead passing 0 to xc_dom_alloc_segment, meaning "pick somewhere". This change instead passes ramdisk_seg.vstart. If nothing has set vstart then it will be zero because the entire dom struct is zeroed on allocation in xc_dom_allocate(). Therefore there is no change to the behaviour on x86. This is also consistent with how other segments (kernel, dtb) are handled.
Furthermore if the ramdisk has been explicitly placed then xc_dom_build_image() assumes that it is not to be decompressed (since that would muck up the sizings used on placement).
With all that I'm able to boot a domain using the current Debian Jessie armhf installer initrd and have it complete successfully.
The emacs magic in tools/libxc/xc_dom_arm.c was wrong, so I corrected it while I was there.
---
v2: - moved comment into header and expanded/reworded a bit
- none of the fdt_* calls in libxl__arch_domain_finalise_hw_description can fail, so simplify error handling using assert.
I'm considering proposing this for backport to 4.4 since lack of initrd support is at the very least rather inconvenient for many use cases.
Also, should we consider (separate from this change) making libxc not decompress the consider ramdisk by default? These days Linux at least can do the decompress itself and supports more algorithmns, like xz.
--- tools/libxc/xc_dom.h | 8 ++++++ tools/libxc/xc_dom_arm.c | 65 ++++++++++++++++++++++++++++++++++---------- tools/libxc/xc_dom_core.c | 13 ++++++--- tools/libxl/libxl_arch.h | 11 +++++--- tools/libxl/libxl_arm.c | 66 ++++++++++++++++++++++++++++++++++++++++----- tools/libxl/libxl_dom.c | 8 ++++-- tools/libxl/libxl_x86.c | 13 ++++++--- 7 files changed, 152 insertions(+), 32 deletions(-)
tools/libxc/xc_dom.h +8 -0
@@ -68,6 +68,14 @@ struct xc_dom_image {/* memory layout */ struct xc_dom_seg kernel_seg; +/* If ramdisk_seg.vstart is non zero then the ramdisk will be +* loaded at that address, otherwise it will automatically placed. +* +* If automatic placement is used and the ramdisk is gzip +* compressed then it will be decompressed as it is loaded. If the +* ramdisk has been explicitly placed then it is loaded as is +* itherwise decompressing risks undoing the manual placement. +*/ struct xc_dom_seg ramdisk_seg;struct xc_dom_seg p2m_seg;struct xc_dom_seg pgtables_seg;
tools/libxc/xc_dom_arm.c +51 -14
87 lines not on this page · raw message
tools/libxc/xc_dom_core.c +10 -3
@@ -955,13 +955,20 @@ int xc_dom_build_image(struct xc_dom_image *dom)size_t unziplen, ramdisklen;void *ramdiskmap; - unziplen =xc_dom_check_gzip (dom->xch, dom->ramdisk_blob, dom->ramdisk_size); -if (xc_dom_ramdisk_check_size (dom, unziplen) !=0 ) +if ( !dom->ramdisk_seg.vstart ) + { + unziplen =xc_dom_check_gzip (dom->xch, + dom->ramdisk_blob, dom->ramdisk_size); +if (xc_dom_ramdisk_check_size (dom, unziplen) !=0 ) + unziplen =0 ; + } +else unziplen =0 ; ramdisklen = unziplen ? unziplen : dom->ramdisk_size; -if (xc_dom_alloc_segment (dom, &dom->ramdisk_seg,"ramdisk" ,0 , +if (xc_dom_alloc_segment (dom, &dom->ramdisk_seg,"ramdisk" , + dom->ramdisk_seg.vstart, ramdisklen) !=0 ) goto err; ramdiskmap =xc_dom_seg_to_ptr (dom, &dom->ramdisk_seg);
tools/libxl/libxl_arch.h +8 -3
@@ -19,7 +19,12 @@int libxl__arch_domain_create (libxl__gc *gc,libxl_domain_config *d_config,uint32_t domid); -int libxl__arch_domain_configure (libxl__gc *gc, -libxl_domain_build_info *info, -struct xc_dom_image *dom); +/* setup arch specific hardware description, i.e. DTB on ARM */ +int libxl__arch_domain_init_hw_description (libxl__gc *gc, +libxl_domain_build_info *info, +struct xc_dom_image *dom); +/* finalize arch specific hardware description. */ +int libxl__arch_domain_finalise_hw_description (libxl__gc *gc, +libxl_domain_build_info *info, +struct xc_dom_image *dom);#endif
tools/libxl/libxl_arm.c +59 -7
110 lines not on this page · raw message
tools/libxl/libxl_dom.c +6 -2
@@ -407,8 +407,8 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,LOGE (ERROR ,"xc_dom_parse_image failed" ); goto out; } -if ( (ret =libxl__arch_domain_configure (gc, info, dom)) !=0 ) { -LOGE (ERROR ,"libxl__arch_domain_configure failed" ); +if ( (ret =libxl__arch_domain_init_hw_description (gc, info, dom)) !=0 ) { +LOGE (ERROR ,"libxl__arch_domain_init_hw_description failed" ); goto out; }if ( (ret =xc_dom_mem_init (dom, info->target_memkb /1024 )) !=0 ) {
@@ -419,6 +419,10 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,LOGE (ERROR ,"xc_dom_boot_mem_init failed" ); goto out; } +if ( (ret =libxl__arch_domain_finalise_hw_description (gc, info, dom)) !=0 ) { +LOGE (ERROR ,"libxl__arch_domain_finalise_hw_description failed" ); + goto out; + }if ( (ret =xc_dom_build_image (dom)) !=0 ) {LOGE (ERROR ,"xc_dom_build_image failed" ); goto out;
tools/libxl/libxl_x86.c +10 -3
@@ -311,9 +311,16 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,return ret; } -int libxl__arch_domain_configure (libxl__gc *gc, -libxl_domain_build_info *info, -struct xc_dom_image *dom) +int libxl__arch_domain_init_hw_description (libxl__gc *gc, +libxl_domain_build_info *info, +struct xc_dom_image *dom) +{ +return 0 ; +} + +int libxl__arch_domain_finalise_hw_description (libxl__gc *gc, +libxl_domain_build_info *info, +struct xc_dom_image *dom) {return 0 ; }
Signature · 1 line
1.7.10.4
Ian Campbell writes ("[PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 6 lines
The ramdisk is passed to the kernel as a property in the chosen node of the device tree. This is somewhat tricky since in order to place the ramdisk and dtb in ram we first need to know the size of the dtb. So we initially create a DTB with placeholders for the ramdisk and finalise the value (which doesn't change the size) once we know where everything is.
I'll leave you to push it (perhaps after giving time for others to comment on v2).
Quoted 3 lines
I'm considering proposing this for backport to 4.4 since lack of initrd support is at the very least rather inconvenient for many use cases.
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list.
Quoted 3 lines
Also, should we consider (separate from this change) making libxc not decompress the consider ramdisk by default? These days Linux at least can do the decompress itself and supports more algorithmns, like xz.
DYK whether Linux has ever not been able to decompress itself - and if so when did this change ? It would be annoying to break some old installations.
Looking at the code, it might be a good idea to at least pass unknown compression formats on to the kernel, rather than failing as we do now.
Thanks,
Ian.
Quoted 8 lines · Ian Jackson
Ian Campbell writes ("[PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 6 lines
The ramdisk is passed to the kernel as a property in the chosen node of the device tree. This is somewhat tricky since in order to place the ramdisk and dtb in ram we first need to know the size of the dtb. So we initially create a DTB with placeholders for the ramdisk and finalise the value (which doesn't change the size) once we know where everything is.
Quoted 4 lines
Acked-by Ian Jackson <[email protected]>I'll leave you to push it (perhaps after giving time for others to comment on v2).
Thanks, I'll leave it until next week.
Quoted 6 lines
Quoted 3 lines
I'm considering proposing this for backport to 4.4 since lack of initrd support is at the very least rather inconvenient for many use cases.
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list.
Sure. Or since I'm supposed to be doing backport stuff for ARM I could pick this one up myself.
Quoted 7 lines
Quoted 3 lines
Also, should we consider (separate from this change) making libxc not decompress the consider ramdisk by default? These days Linux at least can do the decompress itself and supports more algorithmns, like xz.
DYK whether Linux has ever not been able to decompress itself - and if so when did this change ? It would be annoying to break some old installations.
By "itself" ITYM "its ramdisk". The answer there is that I don't know.
If you did mean "itself" then the answer is that it is moot because all of the kernel's self decompression stuff is in early real (16-bit) mode which we skip when booting a PV kernel -- so we definitely do have to decompress the kernel image. Hence the trickle of bzip2, xz, lzma patches to Xen, libxc and stubdoms.
Quoted 3 lines
Looking at the code, it might be a good idea to at least pass unknown compression formats on to the kernel, rather than failing as we do now.
Unless I'm misreading that's what we do.
If either xc_dom_check_gzip or xc_dom_ramdisk_check_size fail then we set unziplen to 0 which indicates "do not decompress" to the remainder of that code block.
Ian.
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 6 lines · Ian Jackson
Quoted 3 lines
DYK whether Linux has ever not been able to decompress itself - and if so when did this change ? It would be annoying to break some old installations.
By "itself" ITYM "its ramdisk". The answer there is that I don't know.
Yes, that's what I meant.
Quoted 5 lines
If you did mean "itself" then the answer is that it is moot because all of the kernel's self decompression stuff is in early real (16-bit) mode which we skip when booting a PV kernel -- so we definitely do have to decompress the kernel image. Hence the trickle of bzip2, xz, lzma patches to Xen, libxc and stubdoms.
Right, yes, I knew that. By "itself" I meant "the kernel is decompresssing the ramdisk (rather than expecting the loader to do it)".
Quoted 9 lines
Quoted 3 lines
Looking at the code, it might be a good idea to at least pass unknown compression formats on to the kernel, rather than failing as we do now.
Unless I'm misreading that's what we do.
If either
xc_dom_check_gziporxc_dom_ramdisk_check_sizefail then we set unziplen to 0 which indicates "do not decompress" to the remainder of that code block.
Oh yes, inded.
I foolishly assumed that since we had a function xc_dom_probe_bzimage_kernel (which dispatches to a variety of decompressors and aborted if it got a compressed image with a magic it doesn't understand) that this function was used for ramdisks too (and hence, wasn't quite accurately named). But I see we have a different ad hoc arrangement for ramdisks.
Hrm. Oh well. I guess this is good enough, then. We won't fail on new compression formats (if they're only used for the ramdisk) and we will work with putative old kernels that don't know how to uncompress ramdisks.
Ian.
Quoted 13 lines · Ian Jackson
Ian Campbell writes ("[PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 6 lines
The ramdisk is passed to the kernel as a property in the chosen node of the device tree. This is somewhat tricky since in order to place the ramdisk and dtb in ram we first need to know the size of the dtb. So we initially create a DTB with placeholders for the ramdisk and finalise the value (which doesn't change the size) once we know where everything is.
Acked-by Ian Jackson <[email protected]>I'll leave you to push it (perhaps after giving time for others to comment on v2).
Quoted 6 lines
Quoted 3 lines
I'm considering proposing this for backport to 4.4 since lack of initrd support is at the very least rather inconvenient for many use cases.
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list
It's in now, commit 314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96b
Ian.
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 5 lines · Ian Jackson
Quoted 2 lines
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list
It's in now, commit
314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96b
Noted, thanks.
Ian.
Hi Ian & Ian,
Quoted 8 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 5 lines · Ian Jackson
Quoted 2 lines
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list
It's in now, commit
314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96bNoted, thanks.
I'm unable to boot a guest with this patch on Xen 4.5. Revert it works correctly. The guest is blocked without useful log.
My config:
kernel="/root/zImage"
memory=128
name="test"
vcpus=2
autoballon="off"
root="/dev/xvda"
extra="console=hvc0"
disk=[ 'phy:/dev/loop0,xvda,w' ]
Signature · 1 line
Julien Grall
Quoted 17 lines · Julien Grall
Hi Ian & Ian,
Quoted 8 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 5 lines · Ian Jackson
Quoted 2 lines
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list
It's in now, commit
314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96bNoted, thanks.
I'm unable to boot a guest with this patch on Xen 4.5. Revert it works correctly. The guest is blocked without useful log.
My config:
Quoted 9 lines
kernel="/root/zImage"
memory=128
name="test"
vcpus=2
autoballon="off"
root="/dev/xvda"
extra="console=hvc0"
disk=[ 'phy:/dev/loop0,xvda,w' ]
This small changes fix boot of the guest with RAM < 128Mb:
tools/libxc/xc_dom_arm.c +1 -1
@@ -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.
Regards,
Signature · 1 line
Julien Grall
Quoted 43 lines · Julien Grall
Quoted 17 lines · Julien Grall
Hi Ian & Ian,
Quoted 8 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 5 lines · Ian Jackson
Quoted 2 lines
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list
It's in now, commit
314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96bNoted, thanks.
I'm unable to boot a guest with this patch on Xen 4.5. Revert it works correctly. The guest is blocked without useful log.
My config:
Quoted 9 lines
kernel="/root/zImage"
memory=128
name="test"
vcpus=2
autoballon="off"
root="/dev/xvda"
extra="console=hvc0"
disk=[ 'phy:/dev/loop0,xvda,w' ]This small changes fix boot of the guest with RAM < 128Mb:
tools/libxc/xc_dom_arm.c +1
-1@@ -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 ;
Quoted 3 lines
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.
Can you resubmit with a changelog and an S-o-b please.
Ian.
Quoted 15 lines · Ian Campbell
Quoted 15 lines
This small changes fix boot of the guest with RAM < 128Mb:
tools/libxc/xc_dom_arm.c +1
-1@@ -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 ;
Quoted 7 lines
Quoted 3 lines
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).
Quoted 1 line
Can you resubmit with a changelog and an S-o-b please.
Sure.
Regards,
Signature · 1 line
Julien Grall
Quoted 25 lines · Julien Grall
Quoted 15 lines · Ian Campbell
Quoted 15 lines
This small changes fix boot of the guest with RAM < 128Mb:
tools/libxc/xc_dom_arm.c +1
-1@@ -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 ;Quoted 7 lines
Quoted 3 lines
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.
Quoted 3 lines
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?
Quoted 7 lines
Quoted 2 lines
Can you resubmit with a changelog and an S-o-b please.
Sure.
Regards,
Quoted 26 lines · Ian Campbell
Quoted 25 lines · Julien Grall
Quoted 22 lines · Ian Campbell
Quoted 15 lines
This small changes fix boot of the guest with RAM < 128Mb:
tools/libxc/xc_dom_arm.c +1
-1@@ -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 ;Quoted 3 lines
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.
Quoted 8 lines
Quoted 3 lines
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_modulescall (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.
Signature · 1 line
Julien Grall
Quoted 34 lines · Julien Grall
Quoted 32 lines · Ian Campbell
Quoted 25 lines · Julien Grall
Quoted 15 lines · Ian Campbell
Quoted 15 lines
This small changes fix boot of the guest with RAM < 128Mb:
tools/libxc/xc_dom_arm.c +1
-1@@ -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 ;Quoted 7 lines
Quoted 3 lines
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.
Quoted 3 lines
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.
Quoted 7 lines
Quoted 2 lines
I think the current code matches the dom0
place_modulescall (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 Xen we have:
if ( kernel_end < MIN(mem_start + MB(128), mem_end - total) )
addr = MIN(mem_start + MB(128), mem_end - total);
else if ( mem_end - ROUNDUP(kernel_end, MB(2)) >= total )
addr = ROUNDUP(kernel_end, MB(2));
else if ( kernel_start - mem_start >= total )
addr = kernel_start - total;
else
{
panic("Unable to find suitable location for dtb+initrd");In libxc we have:
if ( ramend >= ram128mb + modsize && kernend < ram128mb )
modbase = ram128mb;
else if ( ramend >= kernend + modsize )
modbase = kernend;
else
return -1;I think the second if and assignments are equivalent. I think the problem comes from the differences in the first if which are in fact different. They also differ in that userspace won't try and place the modules before the kernel as a last resort.
Switching the Xen side to use the libxc variable names makes it less confusing to compare IMO:
if ( kernend < MIN(ram128mb, ramend - modsize) )
addr = MIN(ram128mb, ramend - modsize);
else if ( ramend - kernend >= modsize )
addr = kernend;
else if ( kernel_start - mem_start >= total )
addr = kernel_start - total;
else
{
panic("Unable to find suitable location for dtb+initrd");I think we need to use that MIN(ram128mb, ramend - modsize) calculation in libxc too.
I'm also wondering if the second statement actually make sense with that change. If kernelend >= ramend - modsize (so the first test fails) then I'm not convinced that ramend - kernend >= modsize can ever be true.
Ian.
Quoted 8 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 5 lines · Ian Jackson
Quoted 2 lines
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list
It's in now, commit
314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96bNoted, thanks.
I thought I'd mentioned this but I don't see my mail:
You will also need to backport a fix at the same time:
6f4ff74 tools: arm: improve placement of initial modules.
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 6 lines · Ian Jackson
Quoted 5 lines
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 4 lines · Ian Jackson
Quoted 2 lines
I think this is a viable backport candidate. Can you let me know when it's in-tree and I'll add it to my list
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
It's in now, commit
314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96bNoted, thanks.
I thought I'd mentioned this but I don't see my mail:
You will also need to backport a fix at the same time:
6f4ff74 tools: arm: improve placement of initial modules.
Thanks. That seems to be on my list already.
Ian.
Ian Jackson writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 5 lines
Ian Campbell writes ("Re: [PATCH v2] tools: implement initial ramdisk support for ARM."):
Quoted 2 lines
You will also need to backport a fix at the same time:
6f4ff74 tools: arm: improve placement of initial modules.Thanks. That seems to be on my list already.
Backported to 4.4.
Ian.
Hi Ian,
tools/libxc/xc_dom.h struct xc_dom_image { · line 77
Quoted 8 lines · Ian Campbell
struct xc_dom_seg kernel_seg;tools/libxc/xc_dom.h +7
-0+/* If ramdisk_seg.vstart is non zero then the ramdisk will be +* loaded at that address, otherwise it will automatically placed. +* +* If automatic placement is used and the ramdisk is gzip +* compressed then it will be decompressed as it is loaded. If the +* ramdisk has been explicitly placed then it is loaded as is +* itherwise decompressing risks undoing the manual placement.
otherwise?
[..]
tools/libxc/xc_dom_arm.c int xc_dom_feature_translated(struct xc_dom_image *dom) · line 329
Quoted 5 lines
tools/libxc/xc_dom_arm.c +0
-1@@ -326,7 +364,6 @@ int xc_dom_feature_translated(struct xc_dom_image *dom)* mode: C * c-file-style: "BSD" * c-basic-offset: 4 -* tab-width: 4
Does it mean that nearly every emacs magic are wrong on the other files?
[..]
tools/libxl/libxl_dom.c int libxl__build_pv(libxl__gc *gc, uint32_t domid, · line 410
Quoted 11 lines
tools/libxl/libxl_dom.c +1
-2@@ -407,8 +407,8 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,LOGE (ERROR ,"xc_dom_parse_image failed" ); goto out; } -if ( (ret =libxl__arch_domain_configure (gc, info, dom)) !=0 ) { -LOGE (ERROR ,"libxl__arch_domain_configure failed" ); +if ( (ret =libxl__arch_domain_init_hw_description (gc, info, dom)) !=0 ) {
Should not it be ((..))? It seems the function is using 2 different coding style.
Signature · 1 line
Julien Grall
Quoted 7 lines · Julien Grall
tools/libxc/xc_dom_arm.c int xc_dom_feature_translated(struct xc_dom_image *dom) · line 329
Quoted 5 lines
tools/libxc/xc_dom_arm.c +0
-1@@ -326,7 +364,6 @@ int xc_dom_feature_translated(struct xc_dom_image *dom)* mode: C * c-file-style: "BSD" * c-basic-offset: 4 -* tab-width: 4 Does it mean that nearly every emacs magic are wrong on the other files?
I thought there weren't many others, but looking again I'm wrong. I think I may have been thinking of "indent-tabs-mode: nil".
I think my emacs must have been playing up when I first edited this file and I confused myself into thinking this change had fixed it.
Quoted 6 lines
Quoted 6 lines
tools/libxl/libxl_dom.c +0
-0@@ -407,8 +407,8 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,LOGE (ERROR ,"xc_dom_parse_image failed" );
Quoted 8 lines
tools/libxl/libxl_dom.c int libxl__build_pv(libxl__gc *gc, uint32_t domid, · line 410
Quoted 5 lines
tools/libxl/libxl_dom.c +1
-2goto out; } -if ( (ret =libxl__arch_domain_configure (gc, info, dom)) !=0 ) { -LOGE (ERROR ,"libxl__arch_domain_configure failed" ); +if ( (ret =libxl__arch_domain_init_hw_description (gc, info, dom)) !=0 ) {Should not it be ((..))? It seems the function is using 2 different coding style.
Looks like some Xen list braces have slipped in here. Probably best for this new addition to be consistent with the surroundings though.
Ian.
Julien Grall
Acked-byQuoted 30 lines · Ian Campbell
Quoted 7 lines · Julien Grall
tools/libxc/xc_dom_arm.c int xc_dom_feature_translated(struct xc_dom_image *dom) · line 329
Quoted 5 lines
tools/libxc/xc_dom_arm.c +0
-1@@ -326,7 +364,6 @@ int xc_dom_feature_translated(struct xc_dom_image *dom)* mode: C * c-file-style: "BSD" * c-basic-offset: 4 -* tab-width: 4 Does it mean that nearly every emacs magic are wrong on the other files?
I thought there weren't many others, but looking again I'm wrong. I think I may have been thinking of "indent-tabs-mode: nil".
I think my emacs must have been playing up when I first edited this file and I confused myself into thinking this change had fixed it.
Quoted 6 lines
Quoted 6 lines
tools/libxl/libxl_dom.c +0
-0@@ -407,8 +407,8 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,LOGE (ERROR ,"xc_dom_parse_image failed" );Quoted 8 lines
tools/libxl/libxl_dom.c int libxl__build_pv(libxl__gc *gc, uint32_t domid, · line 410
Quoted 5 lines
tools/libxl/libxl_dom.c +1
-2goto out; } -if ( (ret =libxl__arch_domain_configure (gc, info, dom)) !=0 ) { -LOGE (ERROR ,"libxl__arch_domain_configure failed" ); +if ( (ret =libxl__arch_domain_init_hw_description (gc, info, dom)) !=0 ) {Should not it be ((..))? It seems the function is using 2 different coding style.
Quoted 2 lines
Looks like some Xen list braces have slipped in here. Probably best for this new addition to be consistent with the surroundings though.
Ok. I forgot to give my ack on this patch (with the emacs fix)
Signature · 1 line
Julien Grall
Quoted 3 lines · Julien Grall
Ok. I forgot to give my ack on this patch (with the emacs fix)
Acked-by Julien Grall <[email protected]>
Applied with the spelling fix, dropping the emacs thing.
Thanks.
Ian.