Patchwork [1.1,1/6] target-xtensa: flush TLB page for new MMU mapping

login
register
mail settings
Submitter Max Filippov
Date May 27, 2012, 2:34 p.m.
Message ID <1338129294-16742-2-git-send-email-jcmvbkbc@gmail.com>
Download mbox | patch
Permalink /patch/161545/
State New
Headers show

Comments

Max Filippov - May 27, 2012, 2:34 p.m.
Both old and new mappings need flushing because their VPN may be
different in MMU case.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 target-xtensa/op_helper.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c
index 364dc19..ce61157 100644
--- a/target-xtensa/op_helper.c
+++ b/target-xtensa/op_helper.c
@@ -669,6 +669,7 @@  void xtensa_tlb_set_entry(CPUXtensaState *env, bool dtlb,
             entry->paddr = pte & xtensa_tlb_get_addr_mask(env, dtlb, wi);
             entry->asid = (env->sregs[RASID] >> ((pte >> 1) & 0x18)) & 0xff;
             entry->attr = pte & 0xf;
+            tlb_flush_page(env, entry->vaddr);
         } else {
             qemu_log("%s %d, %d, %d trying to set immutable entry\n",
                     __func__, dtlb, wi, ei);