[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xen: arm: implement domain_page_map_to_mfn
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1359391700 0 # Node ID 11ba88a82256a5ac5bcdffeac59acecc4448ab8d # Parent 5c0fca4c9bbf25fcf64e3082c9f851bf3e8bceb8 xen: arm: implement domain_page_map_to_mfn This was recently (re?)introduced on x86 in 26447:f831d8dcf18f and is now used in generic code (specifically tmem in 26454:38847c15d8cd). This fixes the build on ARM. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 5c0fca4c9bbf -r 11ba88a82256 xen/arch/arm/mm.c --- a/xen/arch/arm/mm.c Mon Jan 28 16:48:19 2013 +0000 +++ b/xen/arch/arm/mm.c Mon Jan 28 16:48:20 2013 +0000 @@ -208,6 +208,18 @@ void unmap_domain_page(const void *va) local_irq_restore(flags); } +unsigned long domain_page_map_to_mfn(const void *va) +{ + lpae_t *map = xen_second + second_linear_offset(DOMHEAP_VIRT_START); + int slot = ((unsigned long) va - DOMHEAP_VIRT_START) >> SECOND_SHIFT; + unsigned long offset = ((unsigned long)va>>THIRD_SHIFT) & LPAE_ENTRY_MASK; + + ASSERT(slot >= 0 && slot < DOMHEAP_ENTRIES); + ASSERT(map[slot].pt.avail != 0); + + return map[slot].pt.base + offset; +} + void __init arch_init_memory(void) { /* _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |