From d0f3654f8346ac32953b3ca4bb3dce5e63517ab7 Mon Sep 17 00:00:00 2001 From: "Edgar E. Iglesias" Date: Wed, 27 May 2009 01:19:58 +0200 Subject: microblaze: Make writes to MMU_ZPR flush the TLB. Signed-off-by: Edgar E. Iglesias --- target-microblaze/mmu.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'target-microblaze') diff --git a/target-microblaze/mmu.c b/target-microblaze/mmu.c index 72d318384..d14373ce4 100644 --- a/target-microblaze/mmu.c +++ b/target-microblaze/mmu.c @@ -220,6 +220,13 @@ void mmu_write(CPUState *env, uint32_t rn, uint32_t v) D(qemu_log("%s ram[%d][%d]=%x\n", __func__, rn & 1, i, v)); break; case MMU_R_ZPR: + /* Changes to the zone protection reg flush the QEMU TLB. + Fortunately, these are very uncommon. */ + if (v != env->mmu.regs[rn]) { + tlb_flush(env, 1); + } + env->mmu.regs[rn] = v; + break; case MMU_R_PID: if (v != env->mmu.regs[rn]) { mmu_change_pid(env, v); -- cgit v1.2.3-65-gdbad