]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/kvm/x86: Insert legacy regions in linux boot entry
authorMarco Schlumpp <marco@unikraft.io>
Mon, 19 Jun 2023 12:04:58 +0000 (14:04 +0200)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 10:18:45 +0000 (10:18 +0000)
We use this region to write to the VGA console and Firecracker also
keeps this area clear. This ensures that the region is also mapped in
Unikraft.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
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/lxboot.c

index 130136fd55ef3d1d15989d5b039d7bf1e43a78a3..b9e37d4cda33873f60096886323f67c7fe81b0fe 100644 (file)
@@ -135,6 +135,11 @@ lxboot_init_mem(struct ukplat_bootinfo *bi, struct lxboot_params *bp)
                        lxboot_crash(rc, "Unable to add ram mapping");
 
        }
+
+       rc = ukplat_memregion_list_insert_legacy_hi_mem(&bi->mrds);
+       if (unlikely(rc < 0))
+               lxboot_crash(rc,
+                            "Failed to insert legacy high memory region\n");
 }
 
 void lxboot_entry(struct lcpu *lcpu, struct lxboot_params *bp)