/***********************************************************/
/* x86 mmu */
+/* XXX: add PGE support */
/* called when cr3 or PG bit are modified */
static int last_pg_state = -1;
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: