diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c index 48e20ad5ff38..995c3a840010 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c +++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c @@ -1383,11 +1383,15 @@ static void handle_host_smc(struct kvm_cpu_context *host_ctxt) handled = kvm_host_ffa_handler(host_ctxt); if (!handled && smp_load_acquire(&default_host_smc_handler)) handled = default_host_smc_handler(host_ctxt); - if (!handled) - __kvm_hyp_host_forward_smc(host_ctxt); trace_host_smc(func_id, !handled); + if (!handled) { + trace_hyp_exit(); + __kvm_hyp_host_forward_smc(host_ctxt); + trace_hyp_enter(); + } + /* SMC was trapped, move ELR past the current PC. */ kvm_skip_host_instr(); }