Message ID | 20240116185056.15000-2-eliasely@amazon.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] xen/vmap: Check the page has been mapped in vm_init_type() | expand |
diff --git a/xen/common/vmap.c b/xen/common/vmap.c index 330e2ba897..830f64c5ef 100644 --- a/xen/common/vmap.c +++ b/xen/common/vmap.c @@ -35,8 +35,11 @@ void __init vm_init_type(enum vmap_region type, void *start, void *end) for ( i = 0, va = (unsigned long)vm_bitmap(type); i < nr; ++i, va += PAGE_SIZE ) { struct page_info *pg = alloc_domheap_page(NULL, 0); + int rc; + + rc = map_pages_to_xen(va, page_to_mfn(pg), 1, PAGE_HYPERVISOR); + BUG_ON(rc); - map_pages_to_xen(va, page_to_mfn(pg), 1, PAGE_HYPERVISOR); clear_page((void *)va); } bitmap_fill(vm_bitmap(type), vm_low[type]);