Skip to content

Commit

Permalink
target/arm: Don't access TCG code when debugging with KVM
Browse files Browse the repository at this point in the history
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>
(cherry picked from commit 0d3de77)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: trivial change which makes two subsequent cherry-picks to apply cleanly)
  • Loading branch information
Fabiano Rosas authored and Michael Tokarev committed Nov 3, 2023
1 parent 3e273f4 commit d9da3f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions target/arm/ptw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)) {
Expand Down

0 comments on commit d9da3f8

Please sign in to comment.