From: Laurent Vivier Date: Tue, 16 Nov 2021 07:28:40 +0000 (+0100) Subject: migration: fix dump-vmstate with modules X-Git-Tag: v6.2.0-rc2~9^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4067691a2fed9a7639b1264b07c131d8e11f2b4f;p=thirdparty%2Fqemu.git migration: fix dump-vmstate with modules 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 Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211116072840.132731-1-lvivier@redhat.com> Signed-off-by: Gerd Hoffmann --- diff --git a/softmmu/vl.c b/softmmu/vl.c index 1159a64bce4..620a1f1367e 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); }