Skip to contentSkip to conversation

libxl: Use XEN_LIB_DIR to store bootloader from pygrub

PATCH In review Anthony PERARD 2 participants 2 messages Aug 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: Use XEN_LIB_DIR to store bootloader from pygrub

In osstest, the jobs using pygrub on arm64 on the branch linux-linus started to fails with:
[Errno 28] No space left on device
Error writing temporary copy of ramdisk

This is because /var/run is small when dom0 has only 512MB to work with, /var/run is only 40MB. The size of both kernel and ramdisk on this jobs is now about 42MB, so not enough space in /var/run.

So, to avoid writing a big binairy in ramfs, we will use /var/lib instead, like we already do when saving the device model state on migration.

---
 tools/libs/light/libxl_bootloader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libs/light/libxl_bootloader.c +2 -2
index 1bc6e51827..108329b4a5 100644
@@ -245,8 +245,8 @@ static void bootloader_cleanup(libxl__egc *egc, libxl__bootloader_state *bl)
 static void bootloader_setpaths(libxl__gc *gc, libxl__bootloader_state *bl)
 {
     uint32_t domid = bl->domid;
-    bl->outputdir = GCSPRINTF(XEN_RUN_DIR "/bootloader.%"PRIu32".d", domid);
-    bl->outputpath = GCSPRINTF(XEN_RUN_DIR "/bootloader.%"PRIu32".out", domid);
+    bl->outputdir = GCSPRINTF(XEN_LIB_DIR "/bootloader.%"PRIu32".d", domid);
+    bl->outputpath = GCSPRINTF(XEN_LIB_DIR "/bootloader.%"PRIu32".out", domid);
 }
 
 /* Callbacks */
Signature · 1 line
Anthony PERARD
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Anthony PERARD

In osstest, the jobs using pygrub on arm64 on the branch linux-linus started to fails with:
[Errno 28] No space left on device
Error writing temporary copy of ramdisk

This is because /var/run is small when dom0 has only 512MB to work with, /var/run is only 40MB. The size of both kernel and ramdisk on this jobs is now about 42MB, so not enough space in /var/run.

So, to avoid writing a big binairy in ramfs, we will use /var/lib

binary

Quoted 5 lines

instead, like we already do when saving the device model state on migration.

Thanks,
Jason