提交 bff63471 编写于 作者: Q Qiao Nuohan 提交者: Luiz Capitulino

target-i386: Fix mask of pte index in memory mapping

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: NQiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: NJesse Larrew <jlarrew@linux.vnet.ibm.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 fbc2ed95
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册