History | View | Annotate | Download (2.3 kB)
aio / timers: Untangle include files
include/qemu/timer.h has no need to include main-loop.h anddoing so causes an issue for the next patch. Unfortunatelyvarious files assume including timers.h will pull in main-loop.h.Untangle this mess.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
migration: eliminate s->migration_file
The indirection is useless now. Backends can open s->file directly.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Reviewed-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qemu-file: add writable socket QEMUFile
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Reviewed-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>
migration: use QEMUFile for migration channel lifetime
As a start, use QEMUFile to store the destination and close it.qemu_get_fd gets a file descriptor that will be used by the writecallbacks.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Reviewed-by: Juan Quintela <quintela@redhat.com>...
migration: use QEMUFile for writing outgoing migration data
Second, drop the file descriptor indirection, and write directly to theQEMUFile.
migration: make writes blocking
Move all the writes to the migration_thread, and make writingsblocking. Notice that are still using the iothread for everythingthat we do.
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration: include qemu-file.h
They don't use/know anything about buffered-file.
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration: move include files to include/migration/
block: move include files to include/block/
janitor: do not include qemu-char everywhere
Touching char/char.h basically causes the whole of QEMU tobe rebuilt. Avoid this, it is usually unnecessary.
migration: clean up server sockets and handlers before invoking process_incoming_migration
A first step towards making a common "suffix" for all migration protocols,and moving it to process_incoming_migration.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>...
migration: use closesocket, not close
Windows requires this. Migration does not quite work under Windowsbut let's be uniform across QEMU.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration: xxx_close will only be called once
No need to test s->fd again, it is tested in the caller.
migration: close socket QEMUFile from socket_close
The common suffix now is process_incoming_migration+qemu_fclose.
migration: move qemu_fclose to process_incoming_migration
The common suffix is now just process_incoming_migration.
migration: centralize call to migrate_fd_error()
The call to migrate_fd_error() was missing for non-socket backends, socentralize it in qmp_migrate().
Before:
(qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate...
migration (outgoing): add error propagation for all protocols
Error propagation is already there for socket backends. Add it to otherprotocols, simplifying code that tests for errors that will never happen.With all protocols understanding Error, the code can be simplified...
migration (incoming): add error propagation to fd and exec protocols
And remove the superfluous integer return value.
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration: avoid using error_is_set and thus relying on errp != NULL
The migration code is using errp to detect "internal" errors, this meansthat it relies on errp being non-NULL.
No impact so far because our only QMP clients (the QMP marshaller and HMP)...
Fix address handling in inet_nonblocking_connect
getaddrinfo can give us a list of addresses, but we only try toconnect to the first one. If that fails we never proceed tothe next one. This is common on desktop setups that often have ipv6configured but not actually working....
Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connect
No need to add non blocking parameters to the blocking inet_connectadd block parameter for inet_connect_opts instead of using QemuOpt "block".
Signed-off-by: Orit Wasserman <owasserm@redhat.com>...
migration: don't rely on any QERR_SOCKET_*
Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. Theother errors are handled the same by checking if the error is set andthen calling migrate_fd_error() if it's.
It's also necessary to change inet_connect_opts() not to set...
net: inet_connect(), inet_connect_opts(): add in_progress argument
It's used to indicate the special case where a valid file-descriptoris returned (ie. success) but the connection can't be completedw/o blocking.
This is needed because QERR_SOCKET_CONNECT_IN_PROGRESS is not...
use inet_listen()/inet_connect() to support ipv6 migration
Use help functions in qemu-socket.c for tcp migration,which already support ipv6 addresses.
Currently errp will be set to UNDEFINED_ERROR when migration fails,qemu would output "migration failed: ...", and current user can...
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
tcp_close(): check for close() errors too (v2)
In case close() fails, we want to report the error back.
Changes v1 -> v2: - Use braces on if statement to match coding style
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
migration: make migration-{tcp,unix} consistent
Files are almost identical in functionality, just remove thedifferences that make no sense.
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
migration: Don't use callback on file defining it
migration: propagate error correctly
unix and tcp outgoing migration have error values, but didn't returnedit. Make them return the error. Notice that EINPROGRESS & EWOULDBLOCKare not considered errors as call will be retry later.
Signed-off-by: Juan Quintela <quintela@redhat.com>...
migration: Fold MigrationState into FdMigrationState
migration: Rename FdMigrationState MigrationState
migration: Refactor MigrationState creation
migration: move migrate_new to do_migrate
Once there, remove all parameters that don't need to be passed to*start_outgoing_migration() functions
migration: Make *start_outgoing_migration return FdMigrationState
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix conversions from pointer to int and vice versa
Here the int values fds0, sigfd, s, sock and fd are convertedto void pointers which are later converted back to an int value.
These conversions should always use intptr_t instead of unsigned long.
They are needed for environments where sizeof(long) != sizeof(void *)....
Close socket file descriptor when qemu_accept fails
Signed-off-by: Shahar Havivi <shaharh@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Factorize common migration incoming code
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
migration-tcp: call migrate_fd_error() instead of close() and free().
This patch fixes the following error report. When changingmigration-tcp.c to call migrate_fd_error() instead of close() andfree() by itself, monitor is resumed, and returns allocated mig_state...
migration: Clear fd also in error cases
Not clearing the fd and closing the file makes qemu spin using 100%CPUafter incoming migration error.
See for instance bug:https://bugzilla.redhat.com/show_bug.cgi?id=518032
Do not use dprintf
dprintf is already claimed by POSIX1, and on at least one systemis implemented as a macro
[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Signed-off-by: malc <av1474@comtv.ru>
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on filedescriptors that don't need to be passed to children to stop this misbehaviour.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
live migration: Propagate output monitor to callback handler
In order to allow proper progress reporting to the monitor thatinitiated the migration, forward the monitor reference through themigration layer down to SaveLiveStateHandler.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Block live migration
This patch introduces block migration called during live migration. Blockare being copied to the destination in an async way. First the code willtransfer the whole disk and then transfer all dirty blocks accumulted duringthe migration....
fix migration to obey -S
Since migration returns right away, starting the VM rightafter calling qemu_start_incoming_migration is wrong evenif -S is not passed. We have to do this after migrationhas completed.
Cc: Glauber Costa <glommer@redhat.com>Cc: Anthony Liguori <aliguori@us.ibm.com>...
honor -S on incoming migration
-S is not honored by qemu on incoming migration. If a domain is migratedwhile paused, thus, it will start running on the remote machine; thisis wrong.
Given the trivial patch to fix this, it looks more like a thinkothan anything else, probably dating back to the qemu-kvm merge....
Cast pointer arguments of get/setsockopt, send to void * to keep GCCfrom producing a warning about pointer type mismatches with Winsock
monitor: Decouple terminals (Jan Kiszka)
Currently all registered (and activate) monitor terminals work inbroadcast mode: Everyone sees what someone else types on some otherterminal and what the monitor reports back. This model is broken whenyou have a management monitor terminal that is automatically operated...
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Fix brown-paper-bag bugs from live-migration patch (Charles Duffy)
In TCP migration, prevent an endless loop trying to retrieve error status. Inexec migration, set the close pointer in the FdMigrationState structure.
Color me embarrassed.
Signed-off-by: Charles Duffy <charles_duffy@messageone.com>...
Reintroduce migrate-to-exec: support (Charles Duffy)
KVM's live migration support included support for exec: URLs, allowing systemstate to be written or received via an arbitrary popen()ed subprocess. Thisprovides a convenient way to pipe state through a compression algorithm or an...
Make sure to resume the monitor only after flushing out outstandingnetwork traffic.
This was bug was reported by Chris Lalancette.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5640 c046a42c-6fe2-441c-8c8c-71466251a162
Fix GCC 4 signedness warning
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5533 c046a42c-6fe2-441c-8c8c-71466251a162
Fix whitespace in migration code.
Replace tabs with spaces.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5527 c046a42c-6fe2-441c-8c8c-71466251a162
Fix possibly SEGV in tcp migration error case.
Spotted by hpoussin.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5526 c046a42c-6fe2-441c-8c8c-71466251a162
Live migration for Win32 (Hervé Poussineau)
This patch fixes migration so that it works on Win32. This requires usingsocket specific calls since sockets cannot be treated like file descriptorson win32.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>...
Fix windows build after migration changes
The live migration code broke the windows build. As part of thischange, I've switched the BIOS path to C:\Program Files\Qemu instead of/c/Program Files/Qemu. The later is only valid when launching from MSYSbut the former is always valid....
Introduce TCP live migration protocol
This patch introduces a tcp protocol for live migration. It can be used asfollows:
qemu-system-x86_64 -hda ~/images/linux-test.img -monitor stdio <vm runs for a while>(qemu) migrate tcp:localhost:1025
On the same system:...