<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: Î¢ÈíÑźÚ; color: rgb(0, 0, 0); line-height: 1.5; }</style>
</head>
<body>
<div><span></span>Hi£¬can you tell me what's the worst effect if i apply the following patch?</div>
<div><br>
</div>
<div>In order to boot a BIG vm (with 4T mem, 255 vCPUs, 60 virtio-scsi disk...), i have to increase the </div>
<div>BUILD_MAX_HIGHTABLE to 512KB.</div>
<div>But, then i found i can not boot a  specific VM anymore (oracle linux 6.7 64bits with kernel <span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">3.8.13</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">,
 2G mem).</span></div>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">It seems be related with the unused high ram given VM back by SeaBios (maybe also related to </span><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;">the
 memory align).</span></div>
<div><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;">I've tested if setting giveback memory 64KB alignment  other than 4KB, SeaBios with 512KB  </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">BUILD_MAX_HIGHTABLE</span></div>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">can boot the specific VM. But , i don't know the reason...</span></div>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br>
</span></div>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">As far as i know, if seabios does not give back the  unused </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">ZoneHigh memory seems will not
 trigger any problems</span></div>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">but just waste only a little memory ,right?</span></div>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br>
</span></div>
<div><br>
</div>
<div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">diff --git a/src/config.h b/src/config.h<br>
index baca029..b3536f1 100644<br>
index baca029..b3536f1 100644<br>
--- a/src/config.h<br>
+++ b/src/config.h<br>
@@ -17,7 +17,7 @@<br>
 // Maximum number of map entries in the e820 map<br>
 #define BUILD_MAX_E820 32<br>
 // Space to reserve in high-memory for tables<br>
-#define BUILD_MAX_HIGHTABLE (256*1024)<br>
+#define BUILD_MAX_HIGHTABLE (512*1024)<br>
<br>
diff --git a/src/malloc.c b/src/malloc.c<br>
index 3733855..6302525 100644<br>
--- a/src/malloc.c<br>
+++ b/src/malloc.c<br>
@@ -549,13 +549,7 @@ malloc_prepboot(void)<br>
     dprintf(1, "Space available for UMB: %x-%x, %x-%x\n"<br>
             , RomEnd, base, info->range_start, info->range_end);<br>
<br>
-    // Give back unused high ram.<br>
-    info = alloc_find_lowest(&ZoneHigh);<br>
-    if (info) {<br>
-        u32 giveback = ALIGN_DOWN(info->range_end-info->range_start, PAGE_SIZE);<br>
-        e820_add(info->range_start, giveback, E820_RAM);<br>
-        dprintf(1, "Returned %d bytes of ZoneHigh\n", giveback);<br>
-    }<br>
<br>
     calcRamSize();<br>
</span></div>
<hr style="width: 210px; height: 1px; display: none;" color="#b5c4df" size="1" align="left">
<div><span></span></div>
</body>
</html>