diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-06-25 16:19:50 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-06-25 16:19:50 +0000 |
commit | 435183235567e0d942829bcf0507cbd34fdcf8a7 (patch) | |
tree | 7be3719881825b7b3cee359a41d511a3c8d26a70 /translate-i386.c | |
parent | 59faf6d6a6a239fcd1fa283ef8b558299fb37325 (diff) |
added invlpg emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@280 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'translate-i386.c')
-rw-r--r-- | translate-i386.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/translate-i386.c b/translate-i386.c index 79d6eed63f..d986752dae 100644 --- a/translate-i386.c +++ b/translate-i386.c @@ -4036,6 +4036,7 @@ void cpu_x86_close(CPUX86State *env) /***********************************************************/ /* x86 mmu */ +/* XXX: add PGE support */ /* called when cr3 or PG bit are modified */ static int last_pg_state = -1; @@ -4091,8 +4092,18 @@ void cpu_x86_init_mmu(CPUX86State *env) cpu_x86_update_cr0(env); } +/* XXX: also flush 4MB pages */ void cpu_x86_flush_tlb(CPUX86State *env, uint32_t addr) { + int flags; + unsigned long virt_addr; + + flags = page_get_flags(addr); + if (flags & PAGE_VALID) { + virt_addr = addr & ~0xfff; + munmap((void *)virt_addr, 4096); + page_set_flags(virt_addr, virt_addr + 4096, 0); + } } /* return value: |