Linux needs to be able to allocate several pages in low memory.
We had hoped to get around this limit, but it's not possible.

The range 0 to 16M was formerly marked as E820_RESERVED.
Set up 60K of memory (4K->64K) as E820_RAM for guest use.
Continue to leave the 0-4k region as E820_RESERVED, as well
as 64K to 16M.

Change-Id: Icd48bb8b7d6501269d3edb6a8e5b1d7899826a50
Signed-off-by: Ronald G. Minnich <[email protected]>
---
 tests/vmm/vmrunkernel.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/vmm/vmrunkernel.c b/tests/vmm/vmrunkernel.c
index 6dd66a4..116baed 100644
--- a/tests/vmm/vmrunkernel.c
+++ b/tests/vmm/vmrunkernel.c
@@ -556,11 +556,20 @@ int main(int argc, char **argv)
        memset(bp, 0, 4096);
 
        /* Put the e820 memory region information in the boot_params */
-       bp->e820_entries = 3;
+       bp->e820_entries = 5;
        int e820i = 0;
 
+       /* Give it just a tiny bit of memory -- 60k -- at low memory. */
        bp->e820_map[e820i].addr = 0;
-       bp->e820_map[e820i].size = 16 * 1048576;
+       bp->e820_map[e820i].size = 4 * 1024;
+       bp->e820_map[e820i++].type = E820_RESERVED;
+
+       bp->e820_map[e820i].addr = 4 * 1024;
+       bp->e820_map[e820i].size = 64 * 1024 - 4 * 1024;
+       bp->e820_map[e820i++].type = E820_RAM;
+
+       bp->e820_map[e820i].addr = 64 * 1024;
+       bp->e820_map[e820i].size = 16 * 1048576 - 64 * 1024;
        bp->e820_map[e820i++].type = E820_RESERVED;
 
        bp->e820_map[e820i].addr = 16 * 1048576;
-- 
2.8.0.rc3.226.g39d4020

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to