qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests/tcg/xtensa: add test for OOB TLB reads


From: Max Filippov
Subject: [PATCH] tests/tcg/xtensa: add test for OOB TLB reads
Date: Fri, 15 Dec 2023 04:07:51 -0800

Add a test reading *TLB ways 0..15.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 tests/tcg/xtensa/test_mmu.S | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/tcg/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S
index 1006c8cf77b2..94cd09563c7a 100644
--- a/tests/tcg/xtensa/test_mmu.S
+++ b/tests/tcg/xtensa/test_mmu.S
@@ -43,6 +43,17 @@ test_suite mmu
 #endif
 .endm
 
+test tlb_read_ways
+    movi    a2, 0
+1:
+    ritlb0  a3, a2
+    ritlb1  a3, a2
+    rdtlb0  a3, a2
+    rdtlb1  a3, a2
+    addi    a2, a2, 1
+    bltui   a2, 16, 1b
+test_end
+
 test tlb_group
     movi    a2, 0x04000002 /* PPN */
     movi    a3, BASE + 0x01200004 /* VPN */
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]