]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
migration: fix dump-vmstate with modules
authorLaurent Vivier <lvivier@redhat.com>
Tue, 16 Nov 2021 07:28:40 +0000 (08:28 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 22 Nov 2021 10:14:28 +0000 (11:14 +0100)
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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211116072840.132731-1-lvivier@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
softmmu/vl.c

index 1159a64bce4ec0cddf95dde8aa073d5e3b45ea48..620a1f1367e2b033bfec541619d33257920eaa4f 100644 (file)
@@ -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);
     }