]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/kvm/x86: Make sure we have the legacy x86 high memory reserved
authorSergiu Moga <sergiu.moga@protonmail.com>
Mon, 15 May 2023 06:05:29 +0000 (09:05 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 10:18:45 +0000 (10:18 +0000)
Since there is a chance that the previous boot phase did not mark
this area as reserved through a memory region descriptor, make sure
we do it ourselved.

Since this memory region is very low, we do this insertion when this
list is empty to avoid unnecessary iterations.

Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #848

plat/kvm/x86/multiboot.c

index fa263f917c2dc2d30bffe72ef6e22114570c83c6..c798cb2b06032a1fc2d356dc3030919ca37c6091 100644 (file)
@@ -61,6 +61,9 @@ void multiboot_entry(struct lcpu *lcpu, struct multiboot_info *mi)
         */
        do_uk_reloc_kmrds(0, 0);
 
+       /* Ensure that the memory map contains the legacy high mem area */
+       ukplat_memregion_list_insert_legacy_hi_mem(&bi->mrds);
+
        /* Add the cmdline */
        if (mi->flags & MULTIBOOT_INFO_CMDLINE) {
                if (mi->cmdline) {