Skip to contentSkip to conversation

hvmloader: add high memory e820 region if needed

PATCH In review David Vrabel 2 participants 2 messages Mar 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hvmloader: add high memory e820 region if needed

If the MMIO hole is large and hvmloader needs to relocate memory to immediately above the 4 GiB boundary, the e820 presented to the guest will not have a RAM region above 4 GiB.

e.g., a guest with 3 GiB of memory and a 2 GiB MMIO hole will only see 2 GiB.

The required e820 memory region above 4 GiB needs to be added, and not just filled in.

---
 tools/firmware/hvmloader/e820.c | 1 +
 1 file changed, 1 insertion(+)
tools/firmware/hvmloader/e820.c +1 -0
index bbde2be..5541b18 100644
@@ -99,6 +99,7 @@ void adjust_memory_map(void)
                 ((uint64_t)hvm_info->high_mem_pgend << PAGE_SHIFT) -
                     memory_map.map[i].addr;
         memory_map.map[i].type = E820_RAM;
+        memory_map.nr_map++;
     }
 }
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · David Vrabel

If the MMIO hole is large and hvmloader needs to relocate memory to immediately above the 4 GiB boundary, the e820 presented to the guest will not have a RAM region above 4 GiB.

e.g., a guest with 3 GiB of memory and a 2 GiB MMIO hole will only see 2 GiB.

The required e820 memory region above 4 GiB needs to be added, and not just filled in.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel