]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/xen: Do not pass MEMRF_MAP when allocating memregs
authorMichalis Pappas <michalis@unikraft.io>
Tue, 26 Dec 2023 12:23:03 +0000 (13:23 +0100)
committerRazvan Deaconescu <razvan.deaconescu@upb.ro>
Mon, 3 Jun 2024 10:57:23 +0000 (13:57 +0300)
UKPLAT_MEMRF_MAP / UKPLAT_MEMRF_UNMAP mrd types have been obsoleted by
the reworked implementation of paged memory init.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Serban Sorohan <serban.sorohan@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1373

plat/xen/arm/setup.c
plat/xen/x86/setup.c

index bb7964f516254a86dcf93a13fd5cd1c5dc0a4a17..af0e048554c7e71fbb7f934a4d87b04a94c548bf 100644 (file)
@@ -183,7 +183,7 @@ static inline void _dtb_init_mem(uint32_t physical_offset)
        _libxenplat_mrd[1].vbase = _libxenplat_mrd[1].pbase;
        _libxenplat_mrd[1].len   = fdt_size;
        _libxenplat_mrd[1].type  = UKPLAT_MEMRT_DEVICETREE;
-       _libxenplat_mrd[1].flags = UKPLAT_MEMRF_READ | UKPLAT_MEMRF_MAP;
+       _libxenplat_mrd[1].flags = UKPLAT_MEMRF_READ;
 #if CONFIG_UKPLAT_MEMRNAME
        strncpy(_libxenplat_mrd[1].name, "dtb",
                sizeof(_libxenplat_mrd[1].name) - 1);
index 658303ec9773997bd103d5b232e5897a5b6bda73..19b078a000f36bcdb5c89ba416307e3fa6d08197 100644 (file)
@@ -146,8 +146,7 @@ static int _init_mem(struct ukplat_bootinfo *const bi)
                .len = (max_pfn - start_pfn) << PAGE_SHIFT,
                .pg_count = max_pfn - start_pfn,
                .type = UKPLAT_MEMRT_FREE,
-               .flags = UKPLAT_MEMRF_READ | UKPLAT_MEMRF_WRITE |
-                        UKPLAT_MEMRF_MAP,
+               .flags = UKPLAT_MEMRF_READ | UKPLAT_MEMRF_WRITE,
        };
 #if CONFIG_UKPLAT_MEMRNAME
        strncpy(mrd.name, "heap", sizeof(mrd.name) - 1);
@@ -170,8 +169,7 @@ static int _init_mem(struct ukplat_bootinfo *const bi)
                mrd.len = (size_t)HYPERVISOR_start_info->mod_len;
                mrd.pg_count = PAGE_COUNT(mrd.len + mrd.pg_off);
                mrd.type = UKPLAT_MEMRT_INITRD;
-               mrd.flags = UKPLAT_MEMRF_READ | UKPLAT_MEMRF_WRITE |
-                           UKPLAT_MEMRF_MAP;
+               mrd.flags = UKPLAT_MEMRF_READ | UKPLAT_MEMRF_WRITE;
 #if CONFIG_UKPLAT_MEMRNAME
                strncpy(mrd.name, "initrd", sizeof(mrd.name) - 1);
 #endif
@@ -195,7 +193,7 @@ static void _libxenplat_x86bootinfo_setup_cmdl(struct ukplat_bootinfo *bi)
                cmdline_len = sizeof(CONFIG_UK_NAME) - 1;
 
        cmdline = ukplat_memregion_alloc(cmdline_len, UKPLAT_MEMRT_CMDLINE,
-                                        UKPLAT_MEMRF_READ | UKPLAT_MEMRF_MAP);
+                                        UKPLAT_MEMRF_READ);
        if (unlikely(!cmdline))
                UK_CRASH("Could not allocate command-line memory");
 
@@ -210,7 +208,7 @@ static void _libxenplat_x86bootinfo_setup_cmdl(struct ukplat_bootinfo *bi)
         * from the original cmdline obtained above
         */
        cmdline = ukplat_memregion_alloc(cmdline_len, UKPLAT_MEMRT_KERNEL,
-                                        UKPLAT_MEMRF_READ | UKPLAT_MEMRF_MAP);
+                                        UKPLAT_MEMRF_READ);
        if (unlikely(!cmdline))
                UK_CRASH("Could not allocate scratch command-line memory");