All of lore.kernel.org
 help / color / mirror / Atom feed
* Vmap allocator fails to allocate beyond 128MB
@ 2014-09-26 12:17 Vijay Kilari
  2014-09-26 12:46 ` Jan Beulich
  0 siblings, 1 reply; 13+ messages in thread
From: Vijay Kilari @ 2014-09-26 12:17 UTC (permalink / raw)
  To: Ian Campbell, Stefano Stabellini, Stefano Stabellini, Jan Beulich,
	Tim Deegan, Julien Grall
  Cc: Prasun Kapoor, manish.jaggi, xen-devel@lists.xen.org

Hi,

  When devices like SMMU request large ioremap space and if the total allocation
of vmap space is beyond 128MB the allocation fails for next requests
and following warning is seen

create_xen_entries: trying to replace an existing mapping
addr=40001000 mfn=fffd6

I found that vm_top is allocated with only 1 page which can hold
bitmap for only 128MB
space though 1GB of vmap space is assigned.

With 1GB vmap space following are the calculations

vm_base = 0x4000000
vm_end = 0x3ffff
vm_low = 0x8
nr = 1
vm_top = 0x8000

With the below patch, I could get allocations beyond 128MB.

where nr = 8 for 1GB vmap space

diff --git a/xen/common/vmap.c b/xen/common/vmap.c
index 783cea3..369212d 100644
--- a/xen/common/vmap.c
+++ b/xen/common/vmap.c
@@ -27,7 +27,7 @@ void __init vm_init(void)
     vm_base = (void *)VMAP_VIRT_START;
     vm_end = PFN_DOWN(arch_vmap_virt_end() - vm_base);
     vm_low = PFN_UP((vm_end + 7) / 8);
-    nr = PFN_UP((vm_low + 7) / 8);
+    nr = PFN_UP((vm_end + 7) / 8);
     vm_top = nr * PAGE_SIZE * 8;

     for ( i = 0, va = (unsigned long)vm_bitmap; i < nr; ++i, va += PAGE_SIZE )

Regards
Vijay

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-02-16 11:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 12:17 Vmap allocator fails to allocate beyond 128MB Vijay Kilari
2014-09-26 12:46 ` Jan Beulich
2014-09-26 15:23   ` Vijay Kilari
2014-09-26 15:51     ` Jan Beulich
2014-09-29  5:42       ` Vijay Kilari
2014-09-29  6:41         ` Jan Beulich
2014-09-29  7:10           ` Vijay Kilari
2014-09-29  7:26             ` Jan Beulich
2015-02-16 10:17               ` Vijay Kilari
2015-02-16 10:28                 ` Julien Grall
2015-02-16 10:50                   ` Vijay Kilari
2015-02-16 10:57                     ` Julien Grall
2015-02-16 11:32                       ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.