All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] migration: fix dump-vmstate with modules
@ 2021-11-16  7:28 Laurent Vivier
  2021-11-16  8:19 ` [PATCH-for-6.2] " Philippe Mathieu-Daudé
  2021-11-21 16:23 ` [PATCH] " Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-11-16  7:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Paolo Bonzini, kraxel

To work correctly -dump-vmstate and vmstate-static-checker.py need to
dump all the supported vmstates.

But as some devices can be modules, they are not loaded at startup and not
dumped. Fix that by loading all available modules before dumping the
machine vmstate.

Fixes: 7ab6e7fcce97 ("qdev: device module support")
Cc: kraxel@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 softmmu/vl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index 1159a64bce4e..620a1f1367e2 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3766,6 +3766,7 @@ void qemu_init(int argc, char **argv, char **envp)
 
     if (vmstate_dump_file) {
         /* dump and exit */
+        module_load_qom_all();
         dump_vmstate_json_to_file(vmstate_dump_file);
         exit(0);
     }
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH-for-6.2] migration: fix dump-vmstate with modules
  2021-11-16  7:28 [PATCH] migration: fix dump-vmstate with modules Laurent Vivier
@ 2021-11-16  8:19 ` Philippe Mathieu-Daudé
  2021-11-21 16:23 ` [PATCH] " Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-16  8:19 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel; +Cc: Paolo Bonzini, kraxel

On 11/16/21 08:28, Laurent Vivier wrote:
> To work correctly -dump-vmstate and vmstate-static-checker.py need to
> dump all the supported vmstates.
> 
> But as some devices can be modules, they are not loaded at startup and not
> dumped. Fix that by loading all available modules before dumping the
> machine vmstate.
> 
> Fixes: 7ab6e7fcce97 ("qdev: device module support")
> Cc: kraxel@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  softmmu/vl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 1159a64bce4e..620a1f1367e2 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3766,6 +3766,7 @@ void qemu_init(int argc, char **argv, char **envp)
>  
>      if (vmstate_dump_file) {
>          /* dump and exit */
> +        module_load_qom_all();
>          dump_vmstate_json_to_file(vmstate_dump_file);
>          exit(0);
>      }
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] migration: fix dump-vmstate with modules
  2021-11-16  7:28 [PATCH] migration: fix dump-vmstate with modules Laurent Vivier
  2021-11-16  8:19 ` [PATCH-for-6.2] " Philippe Mathieu-Daudé
@ 2021-11-21 16:23 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-11-21 16:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, kraxel

I think it would be good to have this in 6.2

Thanks,
Laurent

On 16/11/2021 08:28, Laurent Vivier wrote:
> To work correctly -dump-vmstate and vmstate-static-checker.py need to
> dump all the supported vmstates.
> 
> But as some devices can be modules, they are not loaded at startup and not
> dumped. Fix that by loading all available modules before dumping the
> machine vmstate.
> 
> Fixes: 7ab6e7fcce97 ("qdev: device module support")
> Cc: kraxel@redhat.com
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>   softmmu/vl.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 1159a64bce4e..620a1f1367e2 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3766,6 +3766,7 @@ void qemu_init(int argc, char **argv, char **envp)
>   
>       if (vmstate_dump_file) {
>           /* dump and exit */
> +        module_load_qom_all();
>           dump_vmstate_json_to_file(vmstate_dump_file);
>           exit(0);
>       }
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-21 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  7:28 [PATCH] migration: fix dump-vmstate with modules Laurent Vivier
2021-11-16  8:19 ` [PATCH-for-6.2] " Philippe Mathieu-Daudé
2021-11-21 16:23 ` [PATCH] " Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.