]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Start migrating migration code into a migration directory
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 12 Dec 2014 11:13:38 +0000 (11:13 +0000)
committerAmit Shah <amit.shah@redhat.com>
Tue, 16 Dec 2014 12:17:36 +0000 (17:47 +0530)
The migration code now occupies a fair chunk of the top level .c
files, it seems time to give it it's own directory.

I've not touched:
   arch_init.c - that's mostly RAM migration but has a few random other
                 bits
   savevm.c    - because it's built target specific

This is purely a code move; no code has changed.
   - it fails checkpatch because of old violations, it feels safer
     to keep this as purely a move and fix those at some mythical future
     date.

The xbzrle and vmstate tests are now only run for softmmu builds
since they require files in the migrate/ directory which is only built
for softmmu.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
15 files changed:
Makefile.objs
migration/Makefile.objs [new file with mode: 0644]
migration/block-migration.c [moved from block-migration.c with 100% similarity]
migration/migration-exec.c [moved from migration-exec.c with 100% similarity]
migration/migration-fd.c [moved from migration-fd.c with 100% similarity]
migration/migration-rdma.c [moved from migration-rdma.c with 100% similarity]
migration/migration-tcp.c [moved from migration-tcp.c with 100% similarity]
migration/migration-unix.c [moved from migration-unix.c with 100% similarity]
migration/migration.c [moved from migration.c with 100% similarity]
migration/qemu-file-stdio.c [moved from qemu-file-stdio.c with 100% similarity]
migration/qemu-file-unix.c [moved from qemu-file-unix.c with 100% similarity]
migration/qemu-file.c [moved from qemu-file.c with 100% similarity]
migration/vmstate.c [moved from vmstate.c with 100% similarity]
migration/xbzrle.c [moved from xbzrle.c with 100% similarity]
tests/Makefile

index 18fd35cf15617bf96dfbe518d74b86ae727dac12..abeb902b58523405df3c69b1bfd61e83009fe839 100644 (file)
@@ -48,15 +48,9 @@ common-obj-$(CONFIG_POSIX) += os-posix.o
 
 common-obj-$(CONFIG_LINUX) += fsdev/
 
-common-obj-y += migration.o migration-tcp.o
-common-obj-y += vmstate.o
-common-obj-y += qemu-file.o qemu-file-unix.o qemu-file-stdio.o
-common-obj-$(CONFIG_RDMA) += migration-rdma.o
+common-obj-y += migration/
 common-obj-y += qemu-char.o #aio.o
-common-obj-y += block-migration.o
-common-obj-y += page_cache.o xbzrle.o
-
-common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
+common-obj-y += page_cache.o
 
 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
 
diff --git a/migration/Makefile.objs b/migration/Makefile.objs
new file mode 100644 (file)
index 0000000..63dbe93
--- /dev/null
@@ -0,0 +1,10 @@
+common-obj-y += migration.o migration-tcp.o
+common-obj-y += vmstate.o
+common-obj-y += qemu-file.o qemu-file-unix.o qemu-file-stdio.o
+common-obj-$(CONFIG_RDMA) += migration-rdma.o
+common-obj-y += xbzrle.o
+
+common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
+
+common-obj-y += block-migration.o
+
similarity index 100%
rename from migration-exec.c
rename to migration/migration-exec.c
similarity index 100%
rename from migration-fd.c
rename to migration/migration-fd.c
similarity index 100%
rename from migration-rdma.c
rename to migration/migration-rdma.c
similarity index 100%
rename from migration-tcp.c
rename to migration/migration-tcp.c
similarity index 100%
rename from migration-unix.c
rename to migration/migration-unix.c
similarity index 100%
rename from migration.c
rename to migration/migration.c
similarity index 100%
rename from qemu-file-unix.c
rename to migration/qemu-file-unix.c
similarity index 100%
rename from qemu-file.c
rename to migration/qemu-file.c
similarity index 100%
rename from vmstate.c
rename to migration/vmstate.c
similarity index 100%
rename from xbzrle.c
rename to migration/xbzrle.c
index 16f0e4c805c08a18db85df70f88b55b805dad326..faba9cb58de8c00dc72cf5afe758e35f49bf3aac 100644 (file)
@@ -48,8 +48,11 @@ check-unit-y += tests/test-hbitmap$(EXESUF)
 check-unit-y += tests/test-x86-cpuid$(EXESUF)
 # all code tested by test-x86-cpuid is inside topology.h
 gcov-files-test-x86-cpuid-y =
+ifeq ($(CONFIG_SOFTMMU),y)
 check-unit-y += tests/test-xbzrle$(EXESUF)
-gcov-files-test-xbzrle-y = xbzrle.c
+gcov-files-test-xbzrle-y = migration/xbzrle.c
+check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF)
+endif
 check-unit-y += tests/test-cutils$(EXESUF)
 gcov-files-test-cutils-y += util/cutils.c
 check-unit-y += tests/test-mul64$(EXESUF)
@@ -61,7 +64,6 @@ check-unit-y += tests/test-bitops$(EXESUF)
 check-unit-$(CONFIG_HAS_GLIB_SUBPROCESS_TESTS) += tests/test-qdev-global-props$(EXESUF)
 check-unit-y += tests/check-qom-interface$(EXESUF)
 gcov-files-check-qom-interface-y = qom/object.c
-check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF)
 check-unit-y += tests/test-qemu-opts$(EXESUF)
 gcov-files-test-qemu-opts-y = qom/test-qemu-opts.c
 
@@ -247,7 +249,7 @@ tests/test-thread-pool$(EXESUF): tests/test-thread-pool.o $(block-obj-y) libqemu
 tests/test-iov$(EXESUF): tests/test-iov.o libqemuutil.a
 tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o libqemuutil.a libqemustub.a
 tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o
-tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o xbzrle.o page_cache.o libqemuutil.a
+tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/xbzrle.o page_cache.o libqemuutil.a
 tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o
 tests/test-int128$(EXESUF): tests/test-int128.o
 tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
@@ -258,7 +260,7 @@ tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
        $(test-qapi-obj-y) \
        libqemuutil.a libqemustub.a
 tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
-       vmstate.o qemu-file.o qemu-file-unix.o \
+       migration/vmstate.o migration/qemu-file.o migration/qemu-file-unix.o \
        libqemuutil.a libqemustub.a
 
 tests/test-qapi-types.c tests/test-qapi-types.h :\