qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v11 03/10] hvf: Introduce hvf_arch_init() callback


From: Peter Maydell
Subject: Re: [PATCH v11 03/10] hvf: Introduce hvf_arch_init() callback
Date: Thu, 16 Sep 2021 11:45:11 +0100

On Wed, 15 Sept 2021 at 19:10, Alexander Graf <agraf@csgraf.de> wrote:
>
> We will need to install a migration helper for the ARM hvf backend.
> Let's introduce an arch callback for the overall hvf init chain to
> do so.
>
> Signed-off-by: Alexander Graf <agraf@csgraf.de>
> ---
>  accel/hvf/hvf-accel-ops.c | 3 ++-
>  include/sysemu/hvf_int.h  | 1 +
>  target/i386/hvf/hvf.c     | 5 +++++
>  3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
> index 71cc2fa70f..65d431868f 100644
> --- a/accel/hvf/hvf-accel-ops.c
> +++ b/accel/hvf/hvf-accel-ops.c
> @@ -324,7 +324,8 @@ static int hvf_accel_init(MachineState *ms)
>
>      hvf_state = s;
>      memory_listener_register(&hvf_memory_listener, &address_space_memory);
> -    return 0;
> +
> +    return hvf_arch_init();
>  }

If the arch-init fails this will leave various things
that hvf_accel_init() just set up not cleaned up.
But kvm's init function doesn't seem to bother to do that
cleanup either, and if we return failure vl.c is going to
call exit(), so I guess it's OK.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]