[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 16/21] migration: Add support for modules
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH v3 16/21] migration: Add support for modules |
Date: |
Fri, 24 Jan 2020 18:13:22 +0000 |
User-agent: |
Mutt/1.13.0 (2019-11-30) |
* Juan Quintela (address@hidden) wrote:
> So we don't have to compile everything in, or have ifdefs
Can you explain to me what this is allowing us to do?
Dave
> Signed-off-by: Juan Quintela <address@hidden>
> ---
> include/qemu/module.h | 2 ++
> vl.c | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/include/qemu/module.h b/include/qemu/module.h
> index 65ba596e46..907cb5c0a5 100644
> --- a/include/qemu/module.h
> +++ b/include/qemu/module.h
> @@ -40,6 +40,7 @@ static void __attribute__((constructor)) do_qemu_init_ ##
> function(void) \
> #endif
>
> typedef enum {
> + MODULE_INIT_MIGRATION,
> MODULE_INIT_BLOCK,
> MODULE_INIT_OPTS,
> MODULE_INIT_QOM,
> @@ -56,6 +57,7 @@ typedef enum {
> #define xen_backend_init(function) module_init(function, \
> MODULE_INIT_XEN_BACKEND)
> #define libqos_init(function) module_init(function, MODULE_INIT_LIBQOS)
> +#define migration_init(function) module_init(function, MODULE_INIT_MIGRATION)
>
> #define block_module_load_one(lib) module_load_one("block-", lib)
> #define ui_module_load_one(lib) module_load_one("ui-", lib)
> diff --git a/vl.c b/vl.c
> index 71d3e7eefb..f331a3921f 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2873,6 +2873,7 @@ int main(int argc, char **argv, char **envp)
> qemu_init_exec_dir(argv[0]);
>
> module_call_init(MODULE_INIT_QOM);
> + module_call_init(MODULE_INIT_MIGRATION);
>
> qemu_add_opts(&qemu_drive_opts);
> qemu_add_drive_opts(&qemu_legacy_drive_opts);
> --
> 2.24.1
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [PATCH v3 11/21] multifd: multifd_send_pages only needs the qemufile, (continued)
- [PATCH v3 12/21] multifd: multifd_queue_page only needs the qemufile, Juan Quintela, 2020/01/23
- [PATCH v3 13/21] multifd: multifd_send_sync_main only needs the qemufile, Juan Quintela, 2020/01/23
- [PATCH v3 14/21] multifd: Use qemu_target_page_size(), Juan Quintela, 2020/01/23
- [PATCH v3 15/21] migration: Make checkpatch happy with comments, Juan Quintela, 2020/01/23
- [PATCH v3 16/21] migration: Add support for modules, Juan Quintela, 2020/01/23
- Re: [PATCH v3 16/21] migration: Add support for modules,
Dr. David Alan Gilbert <=
- [PATCH v3 18/21] migration: Make no compression operations into its own structure, Juan Quintela, 2020/01/23
- [PATCH v3 20/21] configure: Enable test and libs for zstd, Juan Quintela, 2020/01/23
- [PATCH v3 19/21] migration: Add zlib compression multifd support, Juan Quintela, 2020/01/23