[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/29] target-sparc: replace the last tlb entry when
From: |
Artyom Tarasenko |
Subject: |
[Qemu-devel] [PATCH 17/29] target-sparc: replace the last tlb entry when no free entries left |
Date: |
Sat, 1 Oct 2016 12:05:21 +0200 |
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 <address@hidden>
---
target-sparc/ldst_helper.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index 250c23f..11ca74e 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -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
--
2.7.2
- [Qemu-devel] [PATCH 10/29] target-sparc: implement UA2005 hypervisor traps, (continued)
- [Qemu-devel] [PATCH 10/29] target-sparc: implement UA2005 hypervisor traps, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 12/29] target-sparc: implement UA2005 rdhpstate and wrhpstate instructions, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 13/29] target-sparc: fix immediate UA2005 traps, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 14/29] target-sparc: use direct address translation in hyperprivileged mode, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 15/29] target-sparc: allow priveleged ASIs in hyperprivileged mode, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 16/29] target-sparc: ignore writes to UA2005 CPU mondo queue register, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 17/29] target-sparc: replace the last tlb entry when no free entries left,
Artyom Tarasenko <=
- [Qemu-devel] [PATCH 18/29] target-sparc: use SparcV9MMU type for sparc64 I/D-MMUs, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 19/29] target-sparc: implement UA2005 TSB Pointers, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 21/29] target-sparc: allow 256M sized pages, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 20/29] target-sparc: simplify ultrasparc_tsb_pointer, Artyom Tarasenko, 2016/10/01
- [Qemu-devel] [PATCH 22/29] target-sparc: implement auto-demapping for UA2005 CPUs, Artyom Tarasenko, 2016/10/01