Create a new socket for postcopy to be prepared to send postcopy requested
pages via this specific channel, so as to not get blocked by precopy pages.
A new thread is also created on dest qemu to receive data from this new channel
based on the ram_load_postcopy() routine.
The ram_load_postcopy(POSTCOPY) branch and the thread has not started to
function, and that'll be done in follow up patches.
Cleanup the new sockets on both src/dst QEMUs, meanwhile look after the new
thread too to make sure it'll be recycled properly.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220707185502.27149-1-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
  dgilbert: With Peter's fix to quieten compiler warning on
       start_migration
		
	
			
		
			
				
	
	
		
			32 lines
		
	
	
		
			927 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			927 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * QEMU live migration via socket
 | 
						|
 *
 | 
						|
 * Copyright Red Hat, Inc. 2009-2016
 | 
						|
 *
 | 
						|
 * Authors:
 | 
						|
 *  Chris Lalancette <clalance@redhat.com>
 | 
						|
 *  Daniel P. Berrange <berrange@redhat.com>
 | 
						|
 *
 | 
						|
 * This work is licensed under the terms of the GNU GPL, version 2.  See
 | 
						|
 * the COPYING file in the top-level directory.
 | 
						|
 *
 | 
						|
 * Contributions after 2012-01-13 are licensed under the terms of the
 | 
						|
 * GNU GPL, version 2 or (at your option) any later version.
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef QEMU_MIGRATION_SOCKET_H
 | 
						|
#define QEMU_MIGRATION_SOCKET_H
 | 
						|
 | 
						|
#include "io/channel.h"
 | 
						|
#include "io/task.h"
 | 
						|
 | 
						|
void socket_send_channel_create(QIOTaskFunc f, void *data);
 | 
						|
QIOChannel *socket_send_channel_create_sync(Error **errp);
 | 
						|
int socket_send_channel_destroy(QIOChannel *send);
 | 
						|
 | 
						|
void socket_start_incoming_migration(const char *str, Error **errp);
 | 
						|
 | 
						|
void socket_start_outgoing_migration(MigrationState *s, const char *str,
 | 
						|
                                     Error **errp);
 | 
						|
#endif
 |