mirror of https://github.com/xqemu/xqemu.git
postcopy: drop ram_pages parameter from postcopy_ram_incoming_init()
Not needed. Don't expose last_ram_page(). Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180620202736.21399-1-david@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
35374cbdff
commit
c136180c90
2
exec.c
2
exec.c
|
@ -1930,7 +1930,7 @@ static ram_addr_t find_ram_offset(ram_addr_t size)
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long last_ram_page(void)
|
static unsigned long last_ram_page(void)
|
||||||
{
|
{
|
||||||
RAMBlock *block;
|
RAMBlock *block;
|
||||||
ram_addr_t last = 0;
|
ram_addr_t last = 0;
|
||||||
|
|
|
@ -71,7 +71,6 @@ static inline unsigned long int ramblock_recv_bitmap_offset(void *host_addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
long qemu_getrampagesize(void);
|
long qemu_getrampagesize(void);
|
||||||
unsigned long last_ram_page(void);
|
|
||||||
RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr,
|
RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr,
|
||||||
bool share, const char *mem_path,
|
bool share, const char *mem_path,
|
||||||
Error **errp);
|
Error **errp);
|
||||||
|
|
|
@ -500,7 +500,7 @@ static int cleanup_range(const char *block_name, void *host_addr,
|
||||||
* postcopy later; must be called prior to any precopy.
|
* postcopy later; must be called prior to any precopy.
|
||||||
* called from arch_init's similarly named ram_postcopy_incoming_init
|
* called from arch_init's similarly named ram_postcopy_incoming_init
|
||||||
*/
|
*/
|
||||||
int postcopy_ram_incoming_init(MigrationIncomingState *mis, size_t ram_pages)
|
int postcopy_ram_incoming_init(MigrationIncomingState *mis)
|
||||||
{
|
{
|
||||||
if (qemu_ram_foreach_migratable_block(init_range, NULL)) {
|
if (qemu_ram_foreach_migratable_block(init_range, NULL)) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1265,7 +1265,7 @@ bool postcopy_ram_supported_by_host(MigrationIncomingState *mis)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int postcopy_ram_incoming_init(MigrationIncomingState *mis, size_t ram_pages)
|
int postcopy_ram_incoming_init(MigrationIncomingState *mis)
|
||||||
{
|
{
|
||||||
error_report("postcopy_ram_incoming_init: No OS support");
|
error_report("postcopy_ram_incoming_init: No OS support");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -27,7 +27,7 @@ int postcopy_ram_enable_notify(MigrationIncomingState *mis);
|
||||||
* postcopy later; must be called prior to any precopy.
|
* postcopy later; must be called prior to any precopy.
|
||||||
* called from ram.c's similarly named ram_postcopy_incoming_init
|
* called from ram.c's similarly named ram_postcopy_incoming_init
|
||||||
*/
|
*/
|
||||||
int postcopy_ram_incoming_init(MigrationIncomingState *mis, size_t ram_pages);
|
int postcopy_ram_incoming_init(MigrationIncomingState *mis);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At the end of a migration where postcopy_ram_incoming_init was called.
|
* At the end of a migration where postcopy_ram_incoming_init was called.
|
||||||
|
|
|
@ -3564,9 +3564,7 @@ static int ram_load_cleanup(void *opaque)
|
||||||
*/
|
*/
|
||||||
int ram_postcopy_incoming_init(MigrationIncomingState *mis)
|
int ram_postcopy_incoming_init(MigrationIncomingState *mis)
|
||||||
{
|
{
|
||||||
unsigned long ram_pages = last_ram_page();
|
return postcopy_ram_incoming_init(mis);
|
||||||
|
|
||||||
return postcopy_ram_incoming_init(mis, ram_pages);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue