]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/tcg/xtensa: enable autorefill phys_mem tests for MMUv3
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 26 Apr 2022 03:05:18 +0000 (20:05 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Fri, 6 May 2022 22:27:40 +0000 (15:27 -0700)
Autorefill tests in the phys_mem test suite are disabled for cores that
have spanning TLB way, i.e. for all MMUv3 cores. Instead of disabling it
invalidate TLB mappings for entries that conflict with the test.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
tests/tcg/xtensa/test_phys_mem.S

index 9bb3ee3866edcdbe15123a10b6f584d8be15056e..f935a702945cd7cba9f8db62695351cd0e14f6b6 100644 (file)
@@ -2,7 +2,7 @@
 
 test_suite phys_mem
 
-#if XCHAL_HAVE_PTP_MMU && !XCHAL_HAVE_SPANNING_WAY
+#if XCHAL_HAVE_PTP_MMU
 
 .purgem test_init
 
@@ -13,6 +13,14 @@ test_suite phys_mem
     witlb   a2, a3
     movi    a2, 0xc0000000
     wsr     a2, ptevaddr
+#if XCHAL_HAVE_SPANNING_WAY
+    movi    a2, 0xc0000000 | XCHAL_SPANNING_WAY
+    idtlb   a2
+    iitlb   a2
+    movi    a2, 0x20000000 | XCHAL_SPANNING_WAY
+    idtlb   a2
+    iitlb   a2
+#endif
 .endm
 
 test inst_fetch_get_pte_no_phys