OSDN Git Service

Handle bi-directional communication for fd migration
authorCristian Klein <cristian.klein@cs.umu.se>
Thu, 8 Jan 2015 11:11:31 +0000 (11:11 +0000)
committerAmit Shah <amit.shah@redhat.com>
Fri, 16 Jan 2015 07:36:17 +0000 (13:06 +0530)
commit131fe9b843f9a1e55fcbf2457c9cb25c3711b9d8
treec6e9872e69799afe33dd960cdfcf9a743df48a4e
parente1a8c9b67fc97d293211773edcae9e8e2f3367ab
Handle bi-directional communication for fd migration

libvirt prefers opening the TCP connection itself, for two reasons.
First, connection failed errors can be detected easier, without having
to parse qemu's error output.
Second, libvirt might be asked to secure the transfer by tunnelling the
communication through an TLS layer.
Therefore, libvirt opens the TCP connection itself and passes an FD to qemu
using QMP and a POSIX-specific mechanism.

Hence, in order to make the reverse-path work in such cases, qemu needs to
distinguish if the transmitted FD is a socket (reverse-path available)
or not (reverse-path might not be available) and use the corresponding
abstraction.

Signed-off-by: Cristian Klein <cristian.klein@cs.umu.se>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
migration/fd.c