migration: fix dump-vmstate with modules
PATCH 1/1 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.
--- softmmu/vl.c | 1 + 1 file changed, 1 insertion(+)
softmmu/vl.c +1 -0
@@ -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 ); }
Signature · 1 line
2.33.1
Quoted 20 lines · Laurent Vivier
To work correctly -dump-vmstate and
vmstate-static-checker.pyneed 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")Signed-off-by Laurent Vivier <[email protected]>--- softmmu/vl.c | 1 + 1 file changed, 1 insertion(+)softmmu/vl.c +0
-0
softmmu/vl.c void qemu_init(int argc, char **argv, char **envp) · line 3772
Quoted 7 lines
softmmu/vl.c +1
-0@@ -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 ); }
I think it would be good to have this in 6.2
Thanks,
Laurent
Quoted 27 lines · Laurent Vivier
To work correctly -dump-vmstate and
vmstate-static-checker.pyneed 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")Signed-off-by Laurent Vivier <[email protected]>--- softmmu/vl.c | 1 + 1 file changed, 1 insertion(+)softmmu/vl.c +1
-0@@ -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 ); }