[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 2/3] xen/arm: Add p2m_ipa_bits
From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxxx> Export p2m_ipa_bits holding the bit size of IPAs used in p2m tables. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxxxxx> --- xen/arch/arm/p2m.c | 3 +++ xen/include/asm-arm/p2m.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 59dd23a..98f1019 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -17,9 +17,11 @@ #ifdef CONFIG_ARM_64 static unsigned int __read_mostly p2m_root_order; static unsigned int __read_mostly p2m_root_level; +unsigned int __read_mostly p2m_ipa_bits; #define P2M_ROOT_ORDER p2m_root_order #define P2M_ROOT_LEVEL p2m_root_level #else +const unsigned int __read_mostly p2m_ipa_bits = 40; /* First level P2M is alway 2 consecutive pages */ #define P2M_ROOT_LEVEL 1 #define P2M_ROOT_ORDER 1 @@ -1560,6 +1562,7 @@ 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, 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 *); -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |