summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-08-15 10:15:10 +0930
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-17 10:55:53 -0700
commit3438bc96d02ea314a04759e435e50b5b6177f88c (patch)
tree8de80841b5a84def9af260b1e6436e078283dbed /Documentation
parent2366d7cc46e70064f33be79dc415b069d3122772 (diff)
downloadkernel-mfld-blackbay-3438bc96d02ea314a04759e435e50b5b6177f88c.tar.gz
kernel-mfld-blackbay-3438bc96d02ea314a04759e435e50b5b6177f88c.tar.bz2
kernel-mfld-blackbay-3438bc96d02ea314a04759e435e50b5b6177f88c.zip
lguest: allow booting guest with CONFIG_RELOCATABLE=y
commit e22a539824e8ddb82c87b4f415165ede82e6ab56 upstream. The CONFIG_RELOCATABLE code tries to align the unpack destination to the value of 'kernel_alignment' in the setup_hdr. If that's 0, it tries to unpack to address 0, which in fact causes the gunzip code to call 'error("Out of memory while allocating output buffer")'. The bootloader (ie. the lguest Launcher in this case) should be doing setting this field; the normal bzImage is 16M, we can use the same. Reported-by: Stefanos Geraggelos <sgerag@cslab.ece.ntua.gr> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virtual/lguest/lguest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/virtual/lguest/lguest.c b/Documentation/virtual/lguest/lguest.c
index cd9d6af61d0..aec80e53c2d 100644
--- a/Documentation/virtual/lguest/lguest.c
+++ b/Documentation/virtual/lguest/lguest.c
@@ -2008,6 +2008,9 @@ int main(int argc, char *argv[])
/* We use a simple helper to copy the arguments separated by spaces. */
concat((char *)(boot + 1), argv+optind+2);
+ /* Set kernel alignment to 16M (CONFIG_PHYSICAL_ALIGN) */
+ boot->hdr.kernel_alignment = 0x1000000;
+
/* Boot protocol version: 2.07 supports the fields for lguest. */
boot->hdr.version = 0x207;