From: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Subject: [Qemu-devel] [PATCH] Fix mask of pte index
Date: Tue, 21 May 2013 11:00:21 +0800 [thread overview]
Message-ID: <1369105221-26307-1-git-send-email-qiaonuohan@cn.fujitsu.com> (raw)
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.
---
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);
}
--
1.7.1
next reply other threads:[~2013-05-21 3:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 3:00 Qiao Nuohan [this message]
2013-05-21 6:16 ` [Qemu-devel] [PATCH] Fix mask of pte index Jesse Larrew
2013-05-21 11:32 ` Andreas Färber
2013-05-21 12:05 ` Qiao Nuohan
2013-05-21 16:53 ` Andreas Färber
2013-05-22 1:21 ` Qiao Nuohan
2013-05-22 1:25 ` Qiao Nuohan
2013-05-22 12:48 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369105221-26307-1-git-send-email-qiaonuohan@cn.fujitsu.com \
--to=qiaonuohan@cn.fujitsu.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).