[SeaBIOS] [Question] SeaBIOS: cannot boot oracle linux if increase the maximum size of permanent high memory area

Gonglei (Arei) arei.gonglei at huawei.com
Fri May 5 12:49:05 CEST 2017


Hi guys, 

Currently my workmate encountered an issues in the testing environment: 

A letter from him:

In order to boot a BIG vm (with 4T mem, 255 vCPUs, 60 virtio-scsi disk...), i have to increase the 
BUILD_MAX_HIGHTABLE to 512KB.
But, then i found i can not boot a  specific VM anymore (oracle linux 6.7 64bits with kernel 3.8.13, 2G mem).
It seems be related with the unused high ram given VM back by SeaBios (maybe also related to the memory align).
I've tested if setting giveback memory 64KB alignment other than 4KB, SeaBios with 512KB BUILD_MAX_HIGHTABLE
can boot the specific VM. But , i don't know the reason...

As far as i know, if seabios does not give back the unused ZoneHigh memory seems will not trigger any problems
but just waste only a little memory ,right?

Can you tell me what's the worst effect if i apply the following patch? 

Does it influence live migration?

Thanks!


diff --git a/src/config.h b/src/config.h
index baca029..b3536f1 100644
index baca029..b3536f1 100644
--- a/src/config.h
+++ b/src/config.h
@@ -17,7 +17,7 @@
 // Maximum number of map entries in the e820 map
 #define BUILD_MAX_E820 32
 // Space to reserve in high-memory for tables
-#define BUILD_MAX_HIGHTABLE (256*1024)
+#define BUILD_MAX_HIGHTABLE (512*1024)

diff --git a/src/malloc.c b/src/malloc.c
index 3733855..6302525 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -549,13 +549,7 @@ malloc_prepboot(void)
     dprintf(1, "Space available for UMB: %x-%x, %x-%x\n"
             , RomEnd, base, info->range_start, info->range_end);

-    // Give back unused high ram.
-    info = alloc_find_lowest(&ZoneHigh);
-    if (info) {
-        u32 giveback = ALIGN_DOWN(info->range_end-info->range_start, PAGE_SIZE);
-        e820_add(info->range_start, giveback, E820_RAM);
-        dprintf(1, "Returned %d bytes of ZoneHigh\n", giveback);
-    }

     calcRamSize();



Regards,
-Gonglei





More information about the SeaBIOS mailing list