summaryrefslogtreecommitdiffstats
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorPaul Brook2010-03-12 17:54:58 +0100
committerPaul Brook2010-03-12 18:23:50 +0100
commit41c1b1c9ebb45b97795fa9e58eaa6fedc4eafe0e (patch)
tree1386b3cb0d216dcb9a56f91fc38046ebc696cbd3 /cpu-exec.c
parentFix last page errors in page_check_range and page_set_flags. (diff)
downloadqemu-41c1b1c9ebb45b97795fa9e58eaa6fedc4eafe0e.tar.gz
qemu-41c1b1c9ebb45b97795fa9e58eaa6fedc4eafe0e.tar.xz
qemu-41c1b1c9ebb45b97795fa9e58eaa6fedc4eafe0e.zip
Add tb_page_addr_t
The page tracking code in exec.c is used by both userspace and system emulation. Userspace emulation uses it to track virtual pages, and system emulation to track ram pages. Introduce a new type to hold this kind of address. Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 5d6dd514ff..bcfcda207b 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -125,12 +125,13 @@ static TranslationBlock *tb_find_slow(target_ulong pc,
{
TranslationBlock *tb, **ptb1;
unsigned int h;
- target_ulong phys_pc, phys_page1, phys_page2, virt_page2;
+ tb_page_addr_t phys_pc, phys_page1, phys_page2;
+ target_ulong virt_page2;
tb_invalidated_flag = 0;
/* find translated block using physical mappings */
- phys_pc = get_phys_addr_code(env, pc);
+ phys_pc = get_page_addr_code(env, pc);
phys_page1 = phys_pc & TARGET_PAGE_MASK;
phys_page2 = -1;
h = tb_phys_hash_func(phys_pc);
@@ -147,7 +148,7 @@ static TranslationBlock *tb_find_slow(target_ulong pc,
if (tb->page_addr[1] != -1) {
virt_page2 = (pc & TARGET_PAGE_MASK) +
TARGET_PAGE_SIZE;
- phys_page2 = get_phys_addr_code(env, virt_page2);
+ phys_page2 = get_page_addr_code(env, virt_page2);
if (tb->page_addr[1] == phys_page2)
goto found;
} else {