Skip to contentSkip to conversation

memory: Pass a target address to walk_memory_regions_1() not a page index.

PATCH New Huw Davies 1 participant 1 message Jan 27, 2014

lore
Share & tools
lore

Huw Davies

author
#0 lore raw

PATCH 1/1 memory: Pass a target address to walk_memory_regions_1() not a page index.

---
 translate-all.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
translate-all.c +2 -1
index 105c25a..e7ed09c 100644
@@ -1641,7 +1641,8 @@ int walk_memory_regions(void *priv, walk_memory_regions_fn fn)
     data.prot = 0;
 
     for (i = 0; i < V_L1_SIZE; i++) {
-        int rc = walk_memory_regions_1(&data, (abi_ulong)i << V_L1_SHIFT,
+        int rc = walk_memory_regions_1(&data,
+                                       (abi_ulong)i << (V_L1_SHIFT + TARGET_PAGE_BITS),
                                        V_L1_SHIFT / V_L2_BITS - 1, l1_map + i);
 
         if (rc != 0) {
Signature · 1 line
1.8.0