When building --without-default-devices, the semihosting code will not be available, so check the proper config.
Fixes: 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a KVM-only build") Signed-off-by: Fabiano Rosas <faro...@suse.de> --- target/arm/helper.c | 4 ++-- target/arm/tcg/m_helper.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 2297626bfb..24bb7efb34 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10972,7 +10972,7 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs) * We only see semihosting exceptions in TCG only as they are not * trapped to the hypervisor in KVM. */ -#ifdef CONFIG_TCG +#ifdef CONFIG_SEMIHOSTING static void tcg_handle_semihosting(CPUState *cs) { ARMCPU *cpu = ARM_CPU(cs); @@ -11033,7 +11033,7 @@ void arm_cpu_do_interrupt(CPUState *cs) * that caused the exception, not the target exception level, so * must be handled here. */ -#ifdef CONFIG_TCG +#ifdef CONFIG_SEMIHOSTING if (cs->exception_index == EXCP_SEMIHOST) { tcg_handle_semihosting(cs); return; diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c index 9758f225d6..4261f1bb1e 100644 --- a/target/arm/tcg/m_helper.c +++ b/target/arm/tcg/m_helper.c @@ -2345,7 +2345,7 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs) qemu_log_mask(CPU_LOG_INT, "...handling as semihosting call 0x%x\n", env->regs[0]); -#ifdef CONFIG_TCG +#ifdef CONFIG_SEMIHOSTING do_common_semihosting(cs); #else g_assert_not_reached(); -- 2.35.3