From: vijay.kilari@gmail.com
To: Ian.Campbell@citrix.com, julien.grall@linaro.org,
stefano.stabellini@eu.citrix.com, stefano.stabellini@citrix.com,
xen-devel@lists.xen.org
Cc: Prasun.Kapoor@caviumnetworks.com,
Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>,
vijay.kilari@gmail.com
Subject: [PATCH v2 2/3] xen/arm: update page table walk to handle 4 level page table
Date: Tue, 27 May 2014 12:16:45 +0530 [thread overview]
Message-ID: <1401173206-4634-3-git-send-email-vijay.kilari@gmail.com> (raw)
In-Reply-To: <1401173206-4634-1-git-send-email-vijay.kilari@gmail.com>
From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
ARM64 supports 4-level page tables. Update page
table walk function to handle 4 levels
Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
---
xen/arch/arm/mm.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 04e3182..ef3c53e 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -162,13 +162,25 @@ static inline void check_memory_layout_alignment_constraints(void) {
#endif
}
-void dump_pt_walk(lpae_t *first, paddr_t addr)
+void dump_pt_walk(lpae_t *root, paddr_t addr)
{
lpae_t *second = NULL, *third = NULL;
+ lpae_t *first = NULL;
+#ifdef CONFIG_ARM_64
+ if ( zeroeth_table_offset(addr) >= LPAE_ENTRIES )
+ return;
+ printk("0TH[0x%x] = 0x%"PRIpaddr"\n", zeroeth_table_offset(addr),
+ root[zeroeth_table_offset(addr)].bits);
+ if ( !root[zeroeth_table_offset(addr)].walk.valid )
+ goto done;
+
+ first = map_domain_page(root[zeroeth_table_offset(addr)].walk.base);
+#else
+ first = root;
if ( first_table_offset(addr) >= LPAE_ENTRIES )
return;
-
+#endif
printk("1ST[0x%x] = 0x%"PRIpaddr"\n", first_table_offset(addr),
first[first_table_offset(addr)].bits);
if ( !first[first_table_offset(addr)].walk.valid ||
@@ -189,6 +201,9 @@ void dump_pt_walk(lpae_t *first, paddr_t addr)
done:
if (third) unmap_domain_page(third);
if (second) unmap_domain_page(second);
+#ifdef CONFIG_ARM_64
+ if ( first ) unmap_domain_page(first);
+#endif
}
--
1.7.9.5
next prev parent reply other threads:[~2014-05-27 6:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 6:46 [PATCH v2 0/3] xen/arm: Add stage 2 48-bit PA support vijay.kilari
2014-05-27 6:46 ` [PATCH v2 1/3] xen/arm: Add 4-level page table for stage 2 translation vijay.kilari
2014-05-28 14:29 ` Ian Campbell
2014-07-15 13:47 ` Ian Campbell
2014-07-16 11:42 ` Vijay Kilari
2014-07-16 12:35 ` Ian Campbell
2014-07-16 13:53 ` Vijay Kilari
2014-05-27 6:46 ` vijay.kilari [this message]
2014-05-28 14:14 ` [PATCH v2 2/3] xen/arm: update page table walk to handle 4 level page table Ian Campbell
2014-05-27 6:46 ` [PATCH v2 3/3] xen/arm: remove unused VADDR_BITS and VADDR_MASK macros vijay.kilari
2014-05-28 14:15 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401173206-4634-3-git-send-email-vijay.kilari@gmail.com \
--to=vijay.kilari@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=Vijaya.Kumar@caviumnetworks.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).