Move last migration bits into migration/
cover Move last migration bits into migration/
Hi
This do:
- split ram migration bits from arch_init.c into migration/ram.c
- move savevm.c into migration/
- add myself to the copyright list of that files
if you feel your name should be there, jsut sent one patch
- to spot changes easily, I reduce the include mess for arch_init.c and migratio/ram.c in a separate patch. I have been aggresive here, but it complies on x86_64 and x86 linux, cross compiles for w32 and w64, so, we should be quite good.
Please, review.
Thanks, Juan.
Juan Quintela (4):
migration: move ram stuff to migration/ram
migration: move savevm.c inside migration/
migration: Add myself to the copyright list of both files
movement: reduce include files
MAINTAINERS | 2 - Makefile.target | 3 +- arch_init.c | 1795 ++-------------------------------------- include/migration/migration.h | 2 + include/sysemu/arch_init.h | 1 - migration/ram.c | 1671 +++++++++++++++++++++++++++++++++++++ savevm.c => migration/savevm.c | 4 + trace-events | 4 +- 8 files changed, 1752 insertions(+), 1730 deletions(-) create mode 100644 migration/ram.c rename savevm.c => migration/savevm.c (99%)
Signature · 1 line
2.4.0
PATCH 1/4 migration: move ram stuff to migration/ram
For historic reasons, ram migration have been on arch_init.c. Just split it into migration/ram.c, the same that happened with block.c.
There is only code movement, no changes altogether.
--- MAINTAINERS | 1 - Makefile.target | 1 + arch_init.c | 1754 ++--------------------------------------- include/migration/migration.h | 2 + include/sysemu/arch_init.h | 1 - migration/ram.c | 1681 +++++++++++++++++++++++++++++++++++++++ trace-events | 2 +- 7 files changed, 1747 insertions(+), 1695 deletions(-) create mode 100644 migration/ram.c
MAINTAINERS +0 -1
@@ -999,7 +999,6 @@ S: Maintained F: include/migration/ F: migration/ F: savevm.c -F: arch_init.c F: scripts/vmstate-static-checker.py F: tests/vmstate-static-checker-data/
Makefile.target +1 -0
@@ -134,6 +134,7 @@ obj-$(CONFIG_KVM) += kvm-all.o obj-y += memory.o savevm.o cputlb.o obj-y += memory_mapping.o obj-y += dump.o +obj-y += migration/ram.o LIBS := $(libs_softmmu) $(LIBS) # xen support
arch_init.c +62 -1692
1,778 lines not on this page · raw message
include/migration/migration.h +2 -0
@@ -180,4 +180,6 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset, ram_addr_t offset, size_t size, uint64_t *bytes_sent); + +void ram_mig_init (void );#endif
include/sysemu/arch_init.h +0 -1
@@ -30,7 +30,6 @@ extern const uint32_t arch_type;void select_soundhw (const char *optarg);void do_acpitable_option (const QemuOpts *opts);void do_smbios_option (QemuOpts *opts); -void ram_mig_init (void );void cpudef_init (void );void audio_init (void );int kvm_available (void );
migration/ram.c new file +1681 -0
1,195 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.4.0
Part of the diff is not shown here. View the raw message.
Re: [Qemu-devel] [PATCH 1/4] migration: move ram stuff to migration/ram
Quoted 1 line · Juan Quintela
For historic reasons, ram migration have been on
arch_init.c. Just
s/have been on/has been in/
Quoted 5 lines
split it into
migration/ram.c, the same that happened withblock.c.There is only code movement, no changes altogether.
Signed-off-by Juan Quintela <[email protected]>
Quoted 10 lines
--- MAINTAINERS | 1 - Makefile.target | 1 + arch_init.c | 1754 ++--------------------------------------- include/migration/migration.h | 2 + include/sysemu/arch_init.h | 1 - migration/ram.c | 1681 +++++++++++++++++++++++++++++++++++++++ trace-events | 2 +- 7 files changed, 1747 insertions(+), 1695 deletions(-) create mode 100644 migration/ram.c
This diff is harder than necessary to read. It can be made smaller by using the --patience argument when creating the diff:
$ git diff HEAD^ --patience --stat MAINTAINERS | 1 - Makefile.target | 1 + arch_init.c | 1630 --------------------------------------- include/migration/migration.h | 2 + include/sysemu/arch_init.h | 1 - migration/ram.c | 1681 +++++++++++++++++++++++++++++++++++++++++ trace-events | 2 +- 7 files changed, 1685 insertions(+), 1633 deletions(-)
To make it permanent:
$ git config diff.algorithm patience
At any rate, here's how I reviewed:
$ diff -u <(git diff HEAD^ | sed -n 's/^-//p') <(git diff HEAD^ | sed -n 's/^\+//p')
You introduced a newline before mig_sleep_cpu(), and changed the text in the DPRINTF definition, but I can live with that.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH 2/4 migration: move savevm.c inside migration/
In reply to Juan QuintelaNow, everything is in place.
--- MAINTAINERS | 1 - Makefile.target | 4 ++-- savevm.c => migration/savevm.c | 0 trace-events | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) rename savevm.c => migration/savevm.c (100%)
MAINTAINERS +0 -1
@@ -998,7 +998,6 @@ M: Amit Shah <[email protected]> S: Maintained F: include/migration/ F: migration/ -F: savevm.c F: scripts/vmstate-static-checker.py F: tests/vmstate-static-checker-data/
Makefile.target +2 -2
@@ -131,10 +131,10 @@ obj-y += qtest.o bootdevice.o obj-y += hw/ obj-$(CONFIG_FDT) += device_tree.o obj-$(CONFIG_KVM) += kvm-all.o -obj-y += memory.o savevm.o cputlb.o +obj-y += memory.o cputlb.o obj-y += memory_mapping.o obj-y += dump.o -obj-y += migration/ram.o +obj-y += migration/ram.o migration/savevm.o LIBS := $(libs_softmmu) $(LIBS) # xen support
migration/savevm.c renamed from savevm.c +0 -0
trace-events +1 -1
@@ -1167,7 +1167,7 @@ vmware_scratch_read(uint32_t index, uint32_t value) "index %d, value 0x%x" vmware_scratch_write(uint32_t index, uint32_t value) "index %d, value 0x%x" vmware_setmode(uint32_t w, uint32_t h, uint32_t bpp) "%dx%d @ %d bpp" -# savevm.c +# migration/savevm.c qemu_loadvm_state_section(unsigned int section_type) "%d" qemu_loadvm_state_section_partend(uint32_t section_id) "%u" qemu_loadvm_state_section_startfull(uint32_t section_id, const char *idstr, uint32_t instance_id, uint32_t version_id) "%u(%s) %u %u"
Signature · 1 line
2.4.0
Re: [Qemu-devel] [PATCH 2/4] migration: move savevm.c inside migration/
Quoted 11 lines · Juan Quintela
Now, everything is in place.
Signed-off-by Juan Quintela <[email protected]>--- MAINTAINERS | 1 - Makefile.target | 4 ++-- savevm.c => migration/savevm.c | 0 trace-events | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) rename savevm.c => migration/savevm.c (100%)
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH 3/4 migration: Add myself to the copyright list of both files
In reply to Juan QuintelaIf anyone feels like adding himself to the list, just sent me a patch.
--- migration/ram.c | 4 ++++ migration/savevm.c | 4 ++++ 2 files changed, 8 insertions(+)
migration/ram.c +4 -0
@@ -2,6 +2,10 @@* QEMU System Emulator * * Copyright (c) 2003-2008 Fabrice Bellard +* Copyright (c) 2011-2015 Red Hat Inc +* +* Authors: +* Juan Quintela <[email protected]> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal
migration/savevm.c +4 -0
@@ -2,6 +2,10 @@* QEMU System Emulator * * Copyright (c) 2003-2008 Fabrice Bellard +* Copyright (c) 2009-2015 Red Hat Inc +* +* Authors: +* Juan Quintela <[email protected]> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal
Signature · 1 line
2.4.0
Re: [Qemu-devel] [PATCH 3/4] migration: Add myself to the copyright list of both files
Quoted 1 line · Juan Quintela
If anyone feels like adding himself to the list, just sent me a patch.
s/sent/send/
Quoted 6 lines
Signed-off-by Juan Quintela <[email protected]>--- migration/ram.c | 4 ++++ migration/savevm.c | 4 ++++ 2 files changed, 8 insertions(+)
I personally think Authors: attributions tend to go stale quickly (git history is more reliable), and so I tend not to list myself. But I'm not opposed to others who want to use them; therefore:
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH 4/4 movement: reduce include files
In reply to Juan QuintelaTo make changes easier, with the copy, I maintained almost all include files. Now I remove the not needed ones on this patch. This complies on linux x64 with all architecutes configured, and cross-compile for windows 32 and 64 bits.#
--- arch_init.c | 23 ----------------------- migration/ram.c | 18 ++---------------- 2 files changed, 2 insertions(+), 39 deletions(-)
arch_init.c +0 -23
@@ -22,38 +22,15 @@* THE SOFTWARE. */ #include <stdint.h> -#include <stdarg.h> -#include <stdlib.h> -#include <zlib.h> -#ifndef _WIN32 -#include <sys/types.h> -#include <sys/mman.h> -#endif -#include "config.h" -#include "monitor/monitor.h" #include "sysemu/sysemu.h" -#include "qemu/bitops.h" -#include "qemu/bitmap.h" #include "sysemu/arch_init.h" -#include "audio/audio.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/audio/audio.h" -#include "sysemu/kvm.h" -#include "migration/migration.h" #include "hw/i386/smbios.h" -#include "exec/address-spaces.h" -#include "hw/audio/pcspk.h" -#include "migration/page_cache.h" #include "qemu/config-file.h" #include "qemu/error-report.h" #include "qmp-commands.h" -#include "trace.h" -#include "exec/cpu-all.h" -#include "exec/ram_addr.h" #include "hw/acpi/acpi.h" -#include "qemu/host-utils.h" -#include "qemu/rcu_queue.h" #ifdef TARGET_SPARC int graphic_width =1024 ;
migration/ram.c +2 -16
@@ -26,31 +26,17 @@* THE SOFTWARE. */ #include <stdint.h> -#include <stdarg.h> -#include <stdlib.h> #include <zlib.h> -#ifndef _WIN32 -#include <sys/types.h> -#include <sys/mman.h> -#endif -#include "config.h" -#include "monitor/monitor.h" -#include "sysemu/sysemu.h" #include "qemu/bitops.h" #include "qemu/bitmap.h" -#include "hw/i386/pc.h" -#include "hw/pci/pci.h" -#include "hw/audio/audio.h" +#include "qemu/timer.h" +#include "qemu/main-loop.h" #include "migration/migration.h" #include "exec/address-spaces.h" #include "migration/page_cache.h" -#include "qemu/config-file.h" #include "qemu/error-report.h" -#include "qmp-commands.h" #include "trace.h" -#include "exec/cpu-all.h" #include "exec/ram_addr.h" -#include "qemu/host-utils.h" #include "qemu/rcu_queue.h" #ifdef DEBUG_MIGRATION_RAM
Signature · 1 line
2.4.0
Re: [Qemu-devel] [PATCH 4/4] movement: reduce include files
On 05/08/2015 06:43 AM, Juan Quintela wrote:
do you want s/movement/migration/ in the subject?
Quoted 2 lines
To make changes easier, with the copy, I maintained almost all include files. Now I remove the not needed ones on this patch. This complies
s/not needed/unnecessary/
s/complies/compiles/
Quoted 1 line
on linux x64 with all architecutes configured, and cross-compile for
s/architecutes/architectures/
s/compile/compiles/
Quoted 1 line
windows 32 and 64 bits.#
s/#$//
Quoted 6 lines
Signed-off-by Juan Quintela <[email protected]>--- arch_init.c | 23 ----------------------- migration/ram.c | 18 ++---------------- 2 files changed, 2 insertions(+), 39 deletions(-)
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [PATCH 4/4] movement: reduce include files
Quoted 10 lines · Eric Blake
On 05/08/2015 06:43 AM, Juan Quintela wrote:
do you want s/movement/migration/ in the subject?
Quoted 2 lines
To make changes easier, with the copy, I maintained almost all include files. Now I remove the not needed ones on this patch. This complies
s/not needed/unnecessary/
s/complies/compiles/
Quoted 11 lines
Quoted 1 line
on linux x64 with all architecutes configured, and cross-compile for
s/architecutes/architectures/
s/compile/compiles/Quoted 1 line
windows 32 and 64 bits.#
s/#$//
Quoted 2 lines
Signed-off-by Juan Quintela <[email protected]>
Thanks
Included all the changes on the pull request.
And redid the 1st patch with the "patience" bit that you suggested.
Thanks again, Juan.
Quoted 6 lines
Quoted 4 lines
--- arch_init.c | 23 ----------------------- migration/ram.c | 18 ++---------------- 2 files changed, 2 insertions(+), 39 deletions(-)Reviewed-by Eric Blake <[email protected]>