qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Fix mask of pte index


From: Qiao Nuohan
Subject: Re: [Qemu-devel] [PATCH] Fix mask of pte index
Date: Wed, 22 May 2013 09:25:27 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120607 Thunderbird/10.0.5

On 05/22/2013 09:21 AM, Qiao Nuohan wrote:
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>

---
target-i386/arch_memory_mapping.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-i386/arch_memory_mapping.c
b/target-i386/arch_memory_mapping.c
index 844893f..a2eb7e7 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);
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]