[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: Add p2m_ipa_bits
commit cb493c714190216a86a81f7748b4608343576b6a Author: Edgar E. Iglesias <edgar.iglesias@xxxxxxxxxx> AuthorDate: Fri May 8 17:10:09 2015 +1000 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed May 13 14:49:39 2015 +0100 xen/arm: Add p2m_ipa_bits Export p2m_ipa_bits holding the bit size of IPAs used in p2m tables. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Reviewed-by: Julien Grall <julien.grall@xxxxxxxxxx> --- xen/arch/arm/p2m.c | 6 +++++- xen/include/asm-arm/p2m.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 59dd23a..903fa3f 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -27,6 +27,8 @@ static unsigned int __read_mostly p2m_root_level; #define P2M_ROOT_PAGES (1<<P2M_ROOT_ORDER) +unsigned int __read_mostly p2m_ipa_bits; + static bool_t p2m_valid(lpae_t pte) { return pte.p2m.valid; @@ -1518,6 +1520,7 @@ void __init setup_virt_paging(void) #ifdef CONFIG_ARM_32 printk("P2M: 40-bit IPA\n"); + p2m_ipa_bits = 40; val |= VTCR_T0SZ(0x18); /* 40 bit IPA */ val |= VTCR_SL0(0x1); /* P2M starts at first level */ #else /* CONFIG_ARM_64 */ @@ -1560,9 +1563,10 @@ void __init setup_virt_paging(void) p2m_root_order = pa_range_info[pa_range].root_order; p2m_root_level = 2 - pa_range_info[pa_range].sl0; + p2m_ipa_bits = 64 - pa_range_info[pa_range].t0sz; printk("P2M: %d-bit IPA with %d-bit PA\n", - 64 - pa_range_info[pa_range].t0sz, + p2m_ipa_bits, pa_range_info[pa_range].pabits); #endif printk("P2M: %d levels with order-%d root, VTCR 0x%lx\n", diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 341df55..63748ef 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -10,6 +10,9 @@ #define paddr_bits PADDR_BITS +/* Holds the bit size of IPAs in p2m tables. */ +extern unsigned int p2m_ipa_bits; + struct domain; extern void memory_type_changed(struct domain *); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |