summaryrefslogtreecommitdiffstats
path: root/migration/ram.c
Commit message (Collapse)AuthorAgeFilesLines
* migration: reduce the count of strlen callLiang Li2015-07-151-5/+5
| | | | | | | | | | 'strlen' is called three times in 'save_page_header', it's inefficient. Signed-off-by: Liang Li <liang.z.li@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: fix RCU deadlockPaolo Bonzini2015-07-091-1/+2
| | | | | | | migration_end calls synchronize_rcu() within a critical section. That causes a deadlock; move the call after rcu_read_unlock(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* migration: extend migration_bitmapLi Zhijian2015-07-071-0/+28
| | | | | | | | | | | | Prevously, if we hotplug a device(e.g. device_add e1000) during migration is processing in source side, qemu will add a new ram block but migration_bitmap is not extended. In this case, migration_bitmap will overflow and lead qemu abort unexpectedly. Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: protect migration_bitmapLi Zhijian2015-07-071-6/+17
| | | | | | Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Rework ram_control_load_hook to hook during block loadDr. David Alan Gilbert2015-07-071-1/+3
| | | | | | | | | | | We need the names of RAMBlocks as they're loaded for RDMA, reuse a slightly modified ram_control_load_hook: a) Pass a 'data' parameter to use for the name in the block-reg case b) Only some hook types now require the presence of a hook function. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* arch_init: Clean up the duplicate variable 'len' defining in ram_load()zhanghailiang2015-06-121-1/+0
| | | | | | | | | | There are two places that define 'len' variable, It's OK for compiling, but makes it difficult for reading. Remove the local one which defined in the inside 'while' loop. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: reduce include filesJuan Quintela2015-06-121-16/+2
| | | | | | | | | | To make changes easier, with the copy, I maintained almost all include files. Now I remove the unnecessary ones on this patch. This compiles on linux x64 with all architectures configured, and cross-compiles for windows 32 and 64 bits. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* migration: Add myself to the copyright list of both filesJuan Quintela2015-06-121-0/+4
| | | | | | | If anyone feels like adding himself to the list, just sent me a patch. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* migration: move ram stuff to migration/ramJuan Quintela2015-06-121-0/+1639
For historic reasons, ram migration have been on arch_init.c. Just split it into migration/ram.c, the same that happened with block.c. There is only code movement, no changes altogether. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
OpenPOWER on IntegriCloud