]> Git Repo - qemu.git/commitdiff
target-sparc: replace the last tlb entry when no free entries left
authorArtyom Tarasenko <[email protected]>
Tue, 26 Jan 2016 13:42:50 +0000 (14:42 +0100)
committerArtyom Tarasenko <[email protected]>
Wed, 18 Jan 2017 21:03:44 +0000 (22:03 +0100)
Implement the behavior described in the chapter 13.9.11 of
UltraSPARC T1™ Supplement to the UltraSPARC Architecture 2005:

"If a TLB Data-In replacement is attempted with all TLB
entries locked and valid, the last TLB entry (entry 63) is
replaced."

Signed-off-by: Artyom Tarasenko <[email protected]>
target/sparc/ldst_helper.c

index d3747cf0f204bbae1e771e873cd32ac30b95397a..029120d1a0dc9e0e723bc7850e19b240fb0216d5 100644 (file)
@@ -246,9 +246,11 @@ static void replace_tlb_1bit_lru(SparcTLBEntry *tlb,
     }
 
 #ifdef DEBUG_MMU
-    DPRINTF_MMU("%s lru replacement failed: no entries available\n", strmmu);
+    DPRINTF_MMU("%s lru replacement: no free entries available, "
+                "replacing the last one\n", strmmu);
 #endif
-    /* error state? */
+    /* corner case: the last entry is replaced anyway */
+    replace_tlb_entry(&tlb[63], tlb_tag, tlb_tte, env1);
 }
 
 #endif
This page took 0.02687 seconds and 4 git commands to generate.