xen/riscv: initialize the VMAP_DEFAULT virtual range

Call vm_init() to initialize the VMAP_DEFAULT virtual range.

To support this, introduce the populate_pt_range() and
arch_vmap_virt_end() functions, which are used by
vm_init()->vm_init_type().

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Oleksii Kurochko authored and Jan Beulich committed 2024-11-27 11:40:38 +01:00
1 parent e6cf43717d
commit 6b71d4f849
3 files changed
+14 -6

No files matched your search

+5 -6
View File
@@ -351,12 +351,6 @@ void arch_dump_shared_mem_info(void)
BUG_ON("unimplemented");
}
int populate_pt_range(unsigned long virt, unsigned long nr_mfns)
{
BUG_ON("unimplemented");
return -1;
}
int xenmem_add_to_physmap_one(struct domain *d, unsigned int space,
union add_to_physmap_extra extra,
unsigned long idx, gfn_t gfn)
@@ -571,3 +565,8 @@ void __init setup_mm(void)
setup_frametable_mappings(ram_start, ram_end);
max_page = PFN_DOWN(ram_end);
}
void *__init arch_vmap_virt_end(void)
{
return (void *)(VMAP_VIRT_START + VMAP_VIRT_SIZE);
}
+6
View File
@@ -1,6 +1,7 @@
#include <xen/bug.h>
#include <xen/domain_page.h>
#include <xen/errno.h>
#include <xen/init.h>
#include <xen/lib.h>
#include <xen/mm.h>
#include <xen/pfn.h>
@@ -419,3 +420,8 @@ int map_pages_to_xen(unsigned long virt,
return pt_update(virt, mfn, nr_mfns, flags);
}
int __init populate_pt_range(unsigned long virt, unsigned long nr_mfns)
{
return pt_update(virt, INVALID_MFN, nr_mfns, PTE_POPULATE);
}
+3
View File
@@ -7,6 +7,7 @@
#include <xen/init.h>
#include <xen/mm.h>
#include <xen/shutdown.h>
#include <xen/vmap.h>
#include <public/version.h>
@@ -62,6 +63,8 @@ void __init noreturn start_xen(unsigned long bootcpu_id,
setup_mm();
vm_init();
printk("All set up\n");
machine_halt();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.