qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vl: Fix to create migration object before block


From: Anthony PERARD
Subject: Re: [Qemu-devel] [PATCH] vl: Fix to create migration object before block backends again
Date: Wed, 27 Mar 2019 10:51:02 +0000
User-agent: Mutt/1.11.4 (2019-03-13)

On Tue, Mar 26, 2019 at 06:48:54PM +0100, Markus Armbruster wrote:
> Known dependencies:
> 
> * migration object_init() must run before configure_blockdev(), so block
>   backends can register migration blockers
> 
> * configure_blockdev() must run before machine_set_property(), so
>   machine properties can refer to block backends.
> 
> * configure_accelerator() must run after machine creation, because it
>   needs a machine
> 
> * configure_accelerator() must run before migration_object_init(), so
>   migration_object_init() can see accelerator compat properties.
> 
> We're currently violating the last one, because weren't aware of it.  To
> fix that, rejigger some more: move configure_accelerator() before
> migration_object_init() (with a suitable comment), then see what else
> breaks.  Could you try the appended patch and report whether it fixes
> your problem?

Yes, that patch works and doesn't break anything else with Xen.


> diff --git a/vl.c b/vl.c
> index d61d5604e5..28b9e9a170 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4276,6 +4276,12 @@ int main(int argc, char **argv, char **envp)
>          exit(0);
>      }
>  
> +    /*
> +     * Must run before migration_object_init() to make Xen's
> +     * accelerator compat properties stick
> +     */
> +    configure_accelerator(current_machine, argv[0]);
> +
>      /*
>       * Migration object can only be created after global properties
>       * are applied correctly.
> @@ -4297,8 +4303,6 @@ int main(int argc, char **argv, char **envp)
>      current_machine->maxram_size = maxram_size;
>      current_machine->ram_slots = ram_slots;
>  
> -    configure_accelerator(current_machine, argv[0]);
> -
>      if (!qtest_enabled() && machine_class->deprecation_reason) {
>          error_report("Machine type '%s' is deprecated: %s",
>                       machine_class->name, machine_class->deprecation_reason);

-- 
Anthony PERARD



reply via email to

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