> On 28. Oct 2026, at 13:53, Magnus Kulke <[email protected]>
> wrote:
>
> Currently we abort the process immediately if the ioctl returns an
> error, so the error handling routine outside the loop cannot be reached.
> We also enumerate the enum variants explicitly to make it obvious how
> every exit reason is being handled.
>
> Signed-off-by: Magnus Kulke <[email protected]>
Reviewed-by: Mohamed Mediouni <[email protected]>
> ---
> accel/mshv/mshv-all.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
> index d820a67b95..7289c8d1c2 100644
> --- a/accel/mshv/mshv-all.c
> +++ b/accel/mshv/mshv-all.c
> @@ -778,8 +778,8 @@ static int mshv_cpu_exec(CPUState *cpu)
>
> ret = mshv_run_vcpu(mshv_state->vm, cpu, &mshv_msg, &exit_reason);
> if (ret < 0) {
> - error_report("Failed to run on vcpu %d", cpu->cpu_index);
> - abort();
> + error_report("Failed to run on vCPU %d", cpu->cpu_index);
> + break;
> }
>
> switch (exit_reason) {
> @@ -788,7 +788,8 @@ static int mshv_cpu_exec(CPUState *cpu)
> case MshvVmExitDebug:
> ret = EXCP_DEBUG;
> break;
> - default:
> + case MshvVmExitSpecial:
> + case MshvVmExitShutdown:
> ret = EXCP_INTERRUPT;
> break;
> }
> --
> 2.34.1
>
>