[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/3] target-i386: Fix mask of pte index in memory map
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 3/3] target-i386: Fix mask of pte index in memory mapping |
Date: |
Fri, 31 May 2013 10:18:25 -0400 |
From: Qiao Nuohan <address@hidden>
Function walk_pte() needs pte index to calculate virtual address.
However, pte index of PAE paging or IA-32e paging is 9 bit, so the mask
should be 0x1ff.
Signed-off-by: Qiao Nuohan <address@hidden>
Reviewed-by: Jesse Larrew <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
target-i386/arch_memory_mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/arch_memory_mapping.c
b/target-i386/arch_memory_mapping.c
index 24884bd..5096fbd 100644
--- a/target-i386/arch_memory_mapping.c
+++ b/target-i386/arch_memory_mapping.c
@@ -38,7 +38,7 @@ static void walk_pte(MemoryMappingList *list, hwaddr
pte_start_addr,
continue;
}
- start_vaddr = start_line_addr | ((i & 0x1fff) << 12);
+ start_vaddr = start_line_addr | ((i & 0x1ff) << 12);
memory_mapping_list_add_merge_sorted(list, start_paddr,
start_vaddr, 1 << 12);
}
--
1.8.1.4