single-binary: compile once migration files
cover single-binary: compile once migration files
This series removes target dependencies in migration code.
Pierrick Bouvier (3):
migration: compile migration/ram.c once
migration: rename target.c to vfio.c
migration/vfio: compile only once
migration/vfio-stub.c | 16 ++++++++++++++++
migration/{target.c => vfio.c} | 16 +---------------
migration/meson.build | 8 ++++----
3 files changed, 21 insertions(+), 19 deletions(-)
create mode 100644 migration/vfio-stub.c
rename migration/{target.c => vfio.c} (67%)Signature · 1 line
2.47.2
PATCH 1/3 migration: compile migration/ram.c once
--- migration/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
migration/meson.build +2 -2
@@ -31,6 +31,7 @@ system_ss.add(files( 'multifd-zero-page.c', 'options.c', 'postcopy-ram.c', + 'ram.c', 'savevm.c', 'socket.c', 'tls.c',
@@ -50,5 +51,4 @@ system_ss.add(when: uadk, if_true: files('multifd-uadk.c')) system_ss.add(when: qatzip, if_true: files('multifd-qatzip.c')) specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', - if_true: files('ram.c', - 'target.c')) + if_true: files('target.c'))
Signature · 1 line
2.47.2
Re: [PATCH 1/3] migration: compile migration/ram.c once
Quoted 18 lines · Pierrick Bouvier
Signed-off-by Pierrick Bouvier <[email protected]>--- migration/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)migration/meson.build +1
-0@@ -31,6 +31,7 @@ system_ss.add(files( 'multifd-zero-page.c', 'options.c', 'postcopy-ram.c', + 'ram.c', 'savevm.c', 'socket.c', 'tls.c',
migration/meson.build system_ss.add(when: uadk, if_true: files('multifd-uadk.c')) · line 54
Quoted 6 lines
migration/meson.build +1
-2@@ -50,5 +51,4 @@ system_ss.add(when: uadk, if_true: files('multifd-uadk.c')) system_ss.add(when: qatzip, if_true: files('multifd-qatzip.c')) specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', - if_true: files('ram.c', - 'target.c')) + if_true: files('target.c'))
r~
PATCH 2/3 migration: rename target.c to vfio.c
In reply to Pierrick Bouvier---
migration/{target.c => vfio.c} | 2 +-
migration/meson.build | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename migration/{target.c => vfio.c} (90%)migration/vfio.c renamed from migration/target.c +1 -1
@@ -1,5 +1,5 @@/* -* QEMU live migration - functions that need to be compiled target-specific +* QEMU live migration - VFIO * * This work is licensed under the terms of the GNU GPL, version 2 * or (at your option) any later version.
migration/meson.build +1 -1
@@ -51,4 +51,4 @@ system_ss.add(when: uadk, if_true: files('multifd-uadk.c')) system_ss.add(when: qatzip, if_true: files('multifd-qatzip.c')) specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', - if_true: files('target.c')) + if_true: files('vfio.c'))
Signature · 1 line
2.47.2
Re: [PATCH 2/3] migration: rename target.c to vfio.c
Quoted 26 lines · Pierrick Bouvier
Signed-off-by Pierrick Bouvier <[email protected]>--- migration/{target.c => vfio.c} | 2 +- migration/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)rename
migration/{target.c=>vfio.c} (90%)migration/vfio.c renamed from migration/target.c +1
-1@@ -1,5 +1,5 @@/* -* QEMU live migration - functions that need to be compiled target-specific +* QEMU live migration - VFIO * * This work is licensed under the terms of the GNU GPL, version 2 * or (at your option) any later version. migration/meson.build +0
-0
migration/meson.build system_ss.add(when: uadk, if_true: files('multifd-uadk.c')) · line 54
Quoted 5 lines
migration/meson.build +1
-1@@ -51,4 +51,4 @@ system_ss.add(when: uadk, if_true: files('multifd-uadk.c')) system_ss.add(when: qatzip, if_true: files('multifd-qatzip.c')) specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', - if_true: files('target.c')) + if_true: files('vfio.c'))
r~
PATCH 3/3 migration/vfio: compile only once
In reply to Pierrick Bouvier--- migration/vfio-stub.c | 16 ++++++++++++++++ migration/vfio.c | 14 -------------- migration/meson.build | 6 +++--- 3 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 migration/vfio-stub.c
migration/vfio-stub.c new file +16 -0
@@ -0,0 +1,16 @@ +/* +* QEMU live migration - stubs for VFIO +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "migration.h" + +void migration_populate_vfio_info (MigrationInfo *info) +{ +} + +void migration_reset_vfio_bytes_transferred (void ) +{ +}
migration/vfio.c +0 -14
@@ -8,13 +8,8 @@#include "qemu/osdep.h" #include "qapi/qapi-types-migration.h" #include "migration.h" -#include CONFIG_DEVICES - -#ifdef CONFIG_VFIO #include "hw/vfio/vfio-migration.h" -#endif -#ifdef CONFIG_VFIO void migration_populate_vfio_info (MigrationInfo *info) {if (vfio_migration_active ()) {
@@ -27,12 +22,3 @@ void migration_reset_vfio_bytes_transferred(void) {vfio_migration_reset_bytes_transferred (); } -#else -void migration_populate_vfio_info (MigrationInfo *info) -{ -} - -void migration_reset_vfio_bytes_transferred (void ) -{ -} -#endif
migration/meson.build +3 -3
@@ -49,6 +49,6 @@ system_ss.add(when: zstd, if_true: files('multifd-zstd.c')) system_ss.add(when: qpl, if_true: files('multifd-qpl.c')) system_ss.add(when: uadk, if_true: files('multifd-uadk.c')) system_ss.add(when: qatzip, if_true: files('multifd-qatzip.c')) - -specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', - if_true: files('vfio.c')) +system_ss.add(when: 'CONFIG_VFIO', + if_true: files('vfio.c'), + if_false: files('vfio-stub.c'))
Signature · 1 line
2.47.2
Re: [PATCH 3/3] migration/vfio: compile only once
Quoted 8 lines · Pierrick Bouvier
Signed-off-by Pierrick Bouvier <[email protected]>--- migration/vfio-stub.c | 16 ++++++++++++++++ migration/vfio.c | 14 -------------- migration/meson.build | 6 +++--- 3 files changed, 19 insertions(+), 17 deletions(-)create mode 100644
migration/vfio-stub.c
r~
Quoted 7 lines · Pierrick Bouvier
This series removes target dependencies in migration code.
Pierrick Bouvier (3):
migration: compilemigration/ram.conce
migration: renametarget.ctovfio.c
migration/vfio: compile only once
Quoted 6 lines
migration/vfio-stub.c | 16 ++++++++++++++++
migration/{target.c => vfio.c} | 16 +---------------
migration/meson.build | 8 ++++----
3 files changed, 21 insertions(+), 19 deletions(-)
create mode 100644 migration/vfio-stub.c
rename migration/{target.c => vfio.c} (67%)Series:
Quoted 7 lines · Pierrick Bouvier
This series removes target dependencies in migration code.
Pierrick Bouvier (3):
migration: compilemigration/ram.conce
migration: renametarget.ctovfio.c
migration/vfio: compile only once
Quoted 6 lines
migration/vfio-stub.c | 16 ++++++++++++++++
migration/{target.c => vfio.c} | 16 +---------------
migration/meson.build | 8 ++++----
3 files changed, 21 insertions(+), 19 deletions(-)
create mode 100644 migration/vfio-stub.c
rename migration/{target.c => vfio.c} (67%)Signature · 1 line
Peter Xu