[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] arm/traps: fix bug in dump_guest_s1_walk L1 page table offset computation



commit 60e06f2b1b2b818a6e13c719d2df17e434433e6e
Author:     Jonathan Daugherty <jtd@xxxxxxxxxx>
AuthorDate: Wed Jul 20 09:10:16 2016 -0700
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Wed Jul 20 10:32:31 2016 -0700

    arm/traps: fix bug in dump_guest_s1_walk L1 page table offset computation
    
    The dump_guest_s1_walk function was incorrectly using the top 10 bits of
    the virtual address to select the L1 page table index.  The correct
    amount is 12 bits, resulting in a shift of 20 bits rather than 22.
    
    For more details, see the ARMv7-A ARM DDI 0406C.b, section B3.5,
    "Short-descriptor translation table format."
    
    Signed-off-by: Jonathan Daugherty <jtd@xxxxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index a2eb1da..0c10c4d 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -2346,7 +2346,7 @@ void dump_guest_s1_walk(struct domain *d, vaddr_t addr)
     }
     first = map_domain_page(mfn);
 
-    offset = addr >> (12+10);
+    offset = addr >> (12+8);
     printk("1ST[0x%"PRIx32"] (0x%"PRIpaddr") = 0x%08"PRIx32"\n",
            offset, pfn_to_paddr(mfn_x(mfn)), first[offset]);
     if ( !(first[offset] & 0x1) ||
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.