qemu-config: load modules when instantiating option groups
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 May 2021 13:08:17 +0000 (09:08 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 May 2021 12:49:46 +0000 (14:49 +0200)
commit632a8873500d27022c584256afc11e57e2418b94
tree548d46f948fe6082c9477e0980578bee15afe83e
parentd349f92f78d26db2805ca39a7745cc70affea021
qemu-config: load modules when instantiating option groups

Right now the SPICE module is special cased to be loaded when processing
of the -spice command line option.  However, the spice option group
can also be brought in via -readconfig, in which case the module is
not loaded.

Add a generic hook to load modules that provide a QemuOpts group,
and use it for the "spice" and "iscsi" groups.

Fixes: #194
Fixes: https://bugs.launchpad.net/qemu/+bug/1910696
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/config-file.h
softmmu/vl.c
stubs/meson.build
stubs/module-opts.c [new file with mode: 0644]
util/qemu-config.c