migration: loadvm handlers are not used
So we remove all traces of them. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
		
							parent
							
								
									0f42f65781
								
							
						
					
					
						commit
						c2355ad47d
					
				@ -50,8 +50,6 @@ enum mig_rp_message_type {
 | 
				
			|||||||
    MIG_RP_MSG_MAX
 | 
					    MIG_RP_MSG_MAX
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef QLIST_HEAD(, LoadStateEntry) LoadStateEntry_Head;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* State for the incoming migration */
 | 
					/* State for the incoming migration */
 | 
				
			||||||
struct MigrationIncomingState {
 | 
					struct MigrationIncomingState {
 | 
				
			||||||
    QEMUFile *from_src_file;
 | 
					    QEMUFile *from_src_file;
 | 
				
			||||||
@ -89,9 +87,6 @@ struct MigrationIncomingState {
 | 
				
			|||||||
    /* The coroutine we should enter (back) after failover */
 | 
					    /* The coroutine we should enter (back) after failover */
 | 
				
			||||||
    Coroutine *migration_incoming_co;
 | 
					    Coroutine *migration_incoming_co;
 | 
				
			||||||
    QemuSemaphore colo_incoming_sem;
 | 
					    QemuSemaphore colo_incoming_sem;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* See savevm.c */
 | 
					 | 
				
			||||||
    LoadStateEntry_Head loadvm_handlers;
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MigrationIncomingState *migration_incoming_get_current(void);
 | 
					MigrationIncomingState *migration_incoming_get_current(void);
 | 
				
			||||||
 | 
				
			|||||||
@ -1020,8 +1020,6 @@ extern const VMStateInfo vmstate_info_qtailq;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define SELF_ANNOUNCE_ROUNDS 5
 | 
					#define SELF_ANNOUNCE_ROUNDS 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void loadvm_free_handlers(MigrationIncomingState *mis);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
 | 
					int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
 | 
				
			||||||
                       void *opaque, int version_id);
 | 
					                       void *opaque, int version_id);
 | 
				
			||||||
void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
 | 
					void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
 | 
				
			||||||
 | 
				
			|||||||
@ -39,7 +39,6 @@ typedef struct I2SCodec I2SCodec;
 | 
				
			|||||||
typedef struct ISABus ISABus;
 | 
					typedef struct ISABus ISABus;
 | 
				
			||||||
typedef struct ISADevice ISADevice;
 | 
					typedef struct ISADevice ISADevice;
 | 
				
			||||||
typedef struct IsaDma IsaDma;
 | 
					typedef struct IsaDma IsaDma;
 | 
				
			||||||
typedef struct LoadStateEntry LoadStateEntry;
 | 
					 | 
				
			||||||
typedef struct MACAddr MACAddr;
 | 
					typedef struct MACAddr MACAddr;
 | 
				
			||||||
typedef struct MachineClass MachineClass;
 | 
					typedef struct MachineClass MachineClass;
 | 
				
			||||||
typedef struct MachineState MachineState;
 | 
					typedef struct MachineState MachineState;
 | 
				
			||||||
 | 
				
			|||||||
@ -122,7 +122,6 @@ MigrationIncomingState *migration_incoming_get_current(void)
 | 
				
			|||||||
    if (!once) {
 | 
					    if (!once) {
 | 
				
			||||||
        mis_current.state = MIGRATION_STATUS_NONE;
 | 
					        mis_current.state = MIGRATION_STATUS_NONE;
 | 
				
			||||||
        memset(&mis_current, 0, sizeof(MigrationIncomingState));
 | 
					        memset(&mis_current, 0, sizeof(MigrationIncomingState));
 | 
				
			||||||
        QLIST_INIT(&mis_current.loadvm_handlers);
 | 
					 | 
				
			||||||
        qemu_mutex_init(&mis_current.rp_mutex);
 | 
					        qemu_mutex_init(&mis_current.rp_mutex);
 | 
				
			||||||
        qemu_event_init(&mis_current.main_thread_load_event, false);
 | 
					        qemu_event_init(&mis_current.main_thread_load_event, false);
 | 
				
			||||||
        once = true;
 | 
					        once = true;
 | 
				
			||||||
@ -135,7 +134,6 @@ void migration_incoming_state_destroy(void)
 | 
				
			|||||||
    struct MigrationIncomingState *mis = migration_incoming_get_current();
 | 
					    struct MigrationIncomingState *mis = migration_incoming_get_current();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    qemu_event_destroy(&mis->main_thread_load_event);
 | 
					    qemu_event_destroy(&mis->main_thread_load_event);
 | 
				
			||||||
    loadvm_free_handlers(mis);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1804,13 +1804,6 @@ static int loadvm_process_command(QEMUFile *f)
 | 
				
			|||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct LoadStateEntry {
 | 
					 | 
				
			||||||
    QLIST_ENTRY(LoadStateEntry) entry;
 | 
					 | 
				
			||||||
    SaveStateEntry *se;
 | 
					 | 
				
			||||||
    int section_id;
 | 
					 | 
				
			||||||
    int version_id;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Read a footer off the wire and check that it matches the expected section
 | 
					 * Read a footer off the wire and check that it matches the expected section
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@ -1846,22 +1839,11 @@ static bool check_section_footer(QEMUFile *f, SaveStateEntry *se)
 | 
				
			|||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void loadvm_free_handlers(MigrationIncomingState *mis)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    LoadStateEntry *le, *new_le;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    QLIST_FOREACH_SAFE(le, &mis->loadvm_handlers, entry, new_le) {
 | 
					 | 
				
			||||||
        QLIST_REMOVE(le, entry);
 | 
					 | 
				
			||||||
        g_free(le);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
 | 
					qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    uint32_t instance_id, version_id, section_id;
 | 
					    uint32_t instance_id, version_id, section_id;
 | 
				
			||||||
    SaveStateEntry *se;
 | 
					    SaveStateEntry *se;
 | 
				
			||||||
    LoadStateEntry *le;
 | 
					 | 
				
			||||||
    char idstr[256];
 | 
					    char idstr[256];
 | 
				
			||||||
    int ret;
 | 
					    int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1900,14 +1882,6 @@ qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
 | 
				
			|||||||
        return -EINVAL;
 | 
					        return -EINVAL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Add entry */
 | 
					 | 
				
			||||||
    le = g_malloc0(sizeof(*le));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    le->se = se;
 | 
					 | 
				
			||||||
    le->section_id = section_id;
 | 
					 | 
				
			||||||
    le->version_id = version_id;
 | 
					 | 
				
			||||||
    QLIST_INSERT_HEAD(&mis->loadvm_handlers, le, entry);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ret = vmstate_load(f, se, se->load_version_id);
 | 
					    ret = vmstate_load(f, se, se->load_version_id);
 | 
				
			||||||
    if (ret < 0) {
 | 
					    if (ret < 0) {
 | 
				
			||||||
        error_report("error while loading state for instance 0x%x of"
 | 
					        error_report("error while loading state for instance 0x%x of"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user