target/arm: Don't access TCG code when debugging with KVM
authorFabiano Rosas <farosas@suse.de>
Fri, 17 Feb 2023 20:11:35 +0000 (17:11 -0300)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 27 Feb 2023 13:27:04 +0000 (13:27 +0000)
When TCG is disabled this part of the code should not be reachable, so
wrap it with an ifdef for now.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/ptw.c

index 2b125fff44605266325b198b03f17d5b879aa5e2..be0cc6bc15fa5a66481936c51704a72bc8d196ac 100644 (file)
@@ -254,6 +254,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,
         ptw->out_host = NULL;
         ptw->out_rw = false;
     } else {
+#ifdef CONFIG_TCG
         CPUTLBEntryFull *full;
         int flags;
 
@@ -270,6 +271,9 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,
         ptw->out_rw = full->prot & PAGE_WRITE;
         pte_attrs = full->pte_attrs;
         pte_secure = full->attrs.secure;
+#else
+        g_assert_not_reached();
+#endif
     }
 
     if (regime_is_stage2(s2_mmu_idx)) {