qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] single-binary: compile once migration files
@ 2025-07-30 22:04 Pierrick Bouvier
  2025-07-30 22:04 ` [PATCH v2 1/2] migration: compile migration/ram.c once Pierrick Bouvier
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Pierrick Bouvier @ 2025-07-30 22:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, philmd, Fabiano Rosas, Pierrick Bouvier

This series removes target dependencies in migration code.

v2
--

- rebase on top of master (one patch was already merged)

Pierrick Bouvier (2):
  migration: compile migration/ram.c once
  migration/vfio: compile only once

 migration/vfio-stub.c | 16 ++++++++++++++++
 migration/vfio.c      | 14 --------------
 migration/meson.build |  8 ++++----
 3 files changed, 20 insertions(+), 18 deletions(-)
 create mode 100644 migration/vfio-stub.c

-- 
2.47.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] migration: compile migration/ram.c once
  2025-07-30 22:04 [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
@ 2025-07-30 22:04 ` Pierrick Bouvier
  2025-07-31 22:05   ` Richard Henderson
  2025-07-30 22:04 ` [PATCH v2 2/2] migration/vfio: compile only once Pierrick Bouvier
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Pierrick Bouvier @ 2025-07-30 22:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, philmd, Fabiano Rosas, Pierrick Bouvier

Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 migration/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/migration/meson.build b/migration/meson.build
index 276da3be5a3..45e9445f97d 100644
--- a/migration/meson.build
+++ b/migration/meson.build
@@ -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',
-                               'vfio.c'))
+                if_true: files('vfio.c'))
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] migration/vfio: compile only once
  2025-07-30 22:04 [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
  2025-07-30 22:04 ` [PATCH v2 1/2] migration: compile migration/ram.c once Pierrick Bouvier
@ 2025-07-30 22:04 ` Pierrick Bouvier
  2025-07-31 22:05   ` Richard Henderson
  2025-08-22 14:30 ` [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
  2025-08-22 14:53 ` Philippe Mathieu-Daudé
  3 siblings, 1 reply; 7+ messages in thread
From: Pierrick Bouvier @ 2025-07-30 22:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, philmd, Fabiano Rosas, Pierrick Bouvier

Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 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

diff --git a/migration/vfio-stub.c b/migration/vfio-stub.c
new file mode 100644
index 00000000000..f59ebe075dc
--- /dev/null
+++ b/migration/vfio-stub.c
@@ -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)
+{
+}
diff --git a/migration/vfio.c b/migration/vfio.c
index 0b64e49ef06..af6ae2c1e19 100644
--- a/migration/vfio.c
+++ b/migration/vfio.c
@@ -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
diff --git a/migration/meson.build b/migration/meson.build
index 45e9445f97d..0f71544a825 100644
--- a/migration/meson.build
+++ b/migration/meson.build
@@ -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'))
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] migration: compile migration/ram.c once
  2025-07-30 22:04 ` [PATCH v2 1/2] migration: compile migration/ram.c once Pierrick Bouvier
@ 2025-07-31 22:05   ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2025-07-31 22:05 UTC (permalink / raw)
  To: qemu-devel

On 7/31/25 08:04, Pierrick Bouvier wrote:
> Acked-by: Fabiano Rosas <farosas@suse.de>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   migration/meson.build | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] migration/vfio: compile only once
  2025-07-30 22:04 ` [PATCH v2 2/2] migration/vfio: compile only once Pierrick Bouvier
@ 2025-07-31 22:05   ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2025-07-31 22:05 UTC (permalink / raw)
  To: qemu-devel

On 7/31/25 08:04, Pierrick Bouvier wrote:
> Acked-by: Fabiano Rosas<farosas@suse.de>
> Reviewed-by: Peter Xu<peterx@redhat.com>
> Signed-off-by: Pierrick Bouvier<pierrick.bouvier@linaro.org>
> ---
>   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

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/2] single-binary: compile once migration files
  2025-07-30 22:04 [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
  2025-07-30 22:04 ` [PATCH v2 1/2] migration: compile migration/ram.c once Pierrick Bouvier
  2025-07-30 22:04 ` [PATCH v2 2/2] migration/vfio: compile only once Pierrick Bouvier
@ 2025-08-22 14:30 ` Pierrick Bouvier
  2025-08-22 14:53 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 7+ messages in thread
From: Pierrick Bouvier @ 2025-08-22 14:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, philmd, Fabiano Rosas

On 2025-07-30 15:04, Pierrick Bouvier wrote:
> This series removes target dependencies in migration code.
> 
> v2
> --
> 
> - rebase on top of master (one patch was already merged)
> 
> Pierrick Bouvier (2):
>    migration: compile migration/ram.c once
>    migration/vfio: compile only once
> 
>   migration/vfio-stub.c | 16 ++++++++++++++++
>   migration/vfio.c      | 14 --------------
>   migration/meson.build |  8 ++++----
>   3 files changed, 20 insertions(+), 18 deletions(-)
>   create mode 100644 migration/vfio-stub.c
> 


Ping on this series.
I'll be out next week, but it should be ready to be pulled once the 
trunk reopens.

Regards,
Pierrick


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/2] single-binary: compile once migration files
  2025-07-30 22:04 [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
                   ` (2 preceding siblings ...)
  2025-08-22 14:30 ` [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
@ 2025-08-22 14:53 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-08-22 14:53 UTC (permalink / raw)
  To: Pierrick Bouvier, qemu-devel; +Cc: Peter Xu, Fabiano Rosas

On 31/7/25 00:04, Pierrick Bouvier wrote:
> This series removes target dependencies in migration code.


> Pierrick Bouvier (2):
>    migration: compile migration/ram.c once
>    migration/vfio: compile only once

Series queued, thanks!


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-22 14:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 22:04 [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
2025-07-30 22:04 ` [PATCH v2 1/2] migration: compile migration/ram.c once Pierrick Bouvier
2025-07-31 22:05   ` Richard Henderson
2025-07-30 22:04 ` [PATCH v2 2/2] migration/vfio: compile only once Pierrick Bouvier
2025-07-31 22:05   ` Richard Henderson
2025-08-22 14:30 ` [PATCH v2 0/2] single-binary: compile once migration files Pierrick Bouvier
2025-08-22 14:53 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).