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

[xen master] xen/arm: p2m: fix pa_range_info for 52-bit pa range



commit 974c8d810a1daacb3322015cd1c124d26155fc75
Author:     Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
AuthorDate: Wed Oct 19 17:49:13 2022 +0300
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Fri Oct 21 11:15:25 2022 +0100

    xen/arm: p2m: fix pa_range_info for 52-bit pa range
    
    Currently, the fields 'root_order' and 'sl0' of the pa_range_info for
    the 52-bit pa range have the values 3 and 3, respectively.
    This configuration does not match any of the valid root table configurations
    for 4KB granule and t0sz 12, described in ARM DDI 0487I.a D8.2.7.
    
    More specifically, according to ARM DDI 0487I.a D8.2.7, in order to support
    the 52-bit pa size with 4KB granule, the p2m root table needs to be 
configured
    either as a single table at level -1 or as 16 concatenated tables at level 
0.
    Since, currently there is no support for level -1, set the 'root_order' and
    'sl0' fields of the 52-bit pa_range_info according to the second approach.
    
    Note that the values of those fields are not used so far. This patch updates
    their values only for the sake of correctness.
    
    Fixes: 407b13a71e32 ("xen/arm: p2m don't fall over on FEAT_LPA enabled hw")
    Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
    Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
    Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>
    Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>
---
 xen/arch/arm/p2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 00d05bb708..94d3b60b13 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -2281,7 +2281,7 @@ void __init setup_virt_paging(void)
         [3] = { 42,      22/*22*/,  3,          1 },
         [4] = { 44,      20/*20*/,  0,          2 },
         [5] = { 48,      16/*16*/,  0,          2 },
-        [6] = { 52,      12/*12*/,  3,          3 },
+        [6] = { 52,      12/*12*/,  4,          2 },
         [7] = { 0 }  /* Invalid */
     };
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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