- 18 5月, 2016 1 次提交
-
-
由 Stefan Weil 提交于
Signed-off-by: NStefan Weil <sw@weilnetz.de> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 23 3月, 2016 1 次提交
-
-
由 Veronia Bahaa 提交于
Move declarations out of qemu-common.h for functions declared in utils/ files: e.g. include/qemu/path.h for utils/path.c. Move inline functions out of qemu-common.h and into new files (e.g. include/qemu/bcd.h) Signed-off-by: NVeronia Bahaa <veroniabahaa@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 16 2月, 2016 1 次提交
-
-
由 Paolo Bonzini 提交于
This can cause various segmentation faults or aborts in qemu-iotests test 091. Fixes: 5b82b703 Cc: Dave Gilbert <dgilbert@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 09 2月, 2016 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Although accesses to ram_list.dirty_memory[] use atomics so multiple threads can safely dirty the bitmap, the data structure is not fully thread-safe yet. This patch handles the RAM hotplug case where ram_list.dirty_memory[] is grown. ram_list.dirty_memory[] is change from a regular bitmap to an RCU array of pointers to fixed-size bitmap blocks. Threads can continue accessing bitmap blocks while the array is being extended. See the comments in the code for an in-depth explanation of struct DirtyMemoryBlocks. I have tested that live migration with virtio-blk dataplane works. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-Id: <1453728801-5398-2-git-send-email-stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 05 2月, 2016 2 次提交
-
-
由 zhanghailiang 提交于
Some helper functions use parameters 'RAMBlock *block' and 'ram_addr_t *offset', We can use 'PageSearchStatus *pss' directly instead, with this change, we can reduce the number of parameters for these helper function, also it is easily to add new parameters for these helper functions. Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Message-Id: <1452829066-9764-5-git-send-email-zhang.zhanghailiang@huawei.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 zhanghailiang 提交于
Split host_from_stream_offset() into two parts: One is to get ram block, which the block idstr may be get from migration stream, the other is to get hva (host) address from block and the offset. Besides, we will do the check working in a new helper offset_in_ramblock(). Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Message-Id: <1452829066-9764-2-git-send-email-zhang.zhanghailiang@huawei.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 29 1月, 2016 1 次提交
-
-
由 Peter Maydell 提交于
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-2-git-send-email-peter.maydell@linaro.org
-
- 22 1月, 2016 1 次提交
-
-
由 Peter Maydell 提交于
Replace the uint8 softfloat-specific typedef with uint8_t. This change was made with find include hw fpu target-* -name '*.[ch]' | xargs sed -i -e 's/\buint8\b/uint8_t/g' together with manual removal of the typedef definition and manual fixing of more erroneous uses found via test compilation. It turns out that the only code using this type is an accidental use where uint8_t was intended anyway... Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Reviewed-by: NAurelien Jarno <aurelien@aurel32.net> Acked-by: NLeon Alrae <leon.alrae@imgtec.com> Acked-by: NJames Hogan <james.hogan@imgtec.com> Message-id: 1452603315-27030-7-git-send-email-peter.maydell@linaro.org
-
- 13 1月, 2016 4 次提交
-
-
由 Markus Armbruster 提交于
Commit 6daf194d, be62a2eb and 312fd5f2 got rid of a bunch, but they keep coming back. Tracked down with the Coccinelle semantic patch from commit 312fd5f2. Cc: Fam Zheng <famz@redhat.com> Cc: Peter Crosthwaite <crosthwaitepeter@gmail.com> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: David Hildenbrand <dahi@linux.vnet.ibm.com> Cc: Jason J. Herne <jjherne@linux.vnet.ibm.com> Cc: Stefan Berger <stefanb@linux.vnet.ibm.com> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Changchun Ouyang <changchun.ouyang@intel.com> Cc: zhanghailiang <zhang.zhanghailiang@huawei.com> Cc: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: NMarkus Armbruster <armbru@pond.sub.org> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com> Acked-by: NBharata B Rao <bharata@linux.vnet.ibm.com> Acked-by: NFam Zheng <famz@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-17-git-send-email-armbru@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
qemu_get_buffer does a copy, we can avoid the memcpy, and we can then remove the extra buffer. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NLiang Li <liang.z.li@intel.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-7-git-send-email-dgilbert@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Avoid a data copy (if we're lucky) in the xbzrle code. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-6-git-send-email-dgilbert@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Emit an event each time we sync the dirty bitmap on the source; this helps libvirt use postcopy by giving it a kick when it might be a good idea to start the postcopy. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-5-git-send-email-dgilbert@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 11 12月, 2015 1 次提交
-
-
由 Dr. David Alan Gilbert 提交于
My fix (84e7b80a) replaced the last_sent_block update that I'd removed earlier; however it was too aggressive in the xbzrle case. save_xbzrle_page might return '0' to mean that the page didn't need sending since it was the same as the last sent version; in this case we can't update 'last_sent_block' since we didn't actually send it. Symptom: 'Illegal RAM offset 1018000' as we try and send a page to the wrong RAMBlock; potentially that could be a data corruption if you were really unlucky. Fixes: 84e7b80aSigned-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-id: 1449765106-6528-1-git-send-email-dgilbert@redhat.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 19 11月, 2015 1 次提交
-
-
由 Dr. David Alan Gilbert 提交于
In a82d593b I accidentally removed the setting of last_sent_block, put it back. Symptoms: Multithreaded compression only uses one thread. Migration is a bit less efficient since it won't use 'cont' flags. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Fixes: a82d593bSigned-off-by: NJuan Quintela <quintela@redhat.com>
-
- 13 11月, 2015 2 次提交
-
-
由 Dr. David Alan Gilbert 提交于
Where the target page size is different from the host page we special case it, but I messed up on the zero case check. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Juan Quintela 提交于
Not all the wold is 64bits (yet). Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
- 10 11月, 2015 15 次提交
-
-
由 Dr. David Alan Gilbert 提交于
Prior to the start of postcopy, ensure that everything that will be transferred later is a whole host-page in size. This is accomplished by discarding partially transferred host pages and marking any that are partially dirty as fully dirty. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Once we're in postcopy the source processors are stopped and memory shouldn't change any more, so there's no need to look at the dirty map. There are two notes to this: 1) If we do resync and a page had changed then the page would get sent again, which the destination wouldn't allow (since it might have also modified the page) 2) Before disabling this I'd seen very rare cases where a page had been marked dirtied although the memory contents are apparently identical Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Ensure that target pages received within a host page are in order. This shouldn't trigger, but in the cases where the sender goes wrong and sends stuff out of order it produces a corruption that's really nasty to debug. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
In postcopy, the destination guest is running at the same time as it's receiving pages; as we receive new pages we must put them into the guests address space atomically to avoid a running CPU accessing a partially written page. Use the helpers in postcopy-ram.c to map these pages. qemu_get_buffer_in_place is used to avoid a copy out of qemu_file in the case that postcopy is going to do a copy anyway. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
When transmitting RAM pages, consume pages that have been queued by MIG_RPCOMM_REQPAGE commands and send them ahead of normal page scanning. Note: a) After a queued page the linear walk carries on from after the unqueued page; there is a reasonable chance that the destination was about to ask for other closeby pages anyway. b) We have to be careful of any assumptions that the page walking code makes, in particular it does some short cuts on its first linear walk that break as soon as we do a queued page. c) We have to be careful to not break up host-page size chunks, since this makes it harder to place the pages on the destination. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
On receiving MIG_RPCOMM_REQ_PAGES look up the address and queue the page. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Soon we'll be in either ACTIVE or POSTCOPY_ACTIVE when we complete migration, and we need to know which we expect to be in to change state safely. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Maintain an 'unsentmap' of pages that have yet to be sent. This is used in the following patches to discard some set of the pages already sent as we enter postcopy mode. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Add qemu_savevm_state_complete_postcopy to complement qemu_savevm_state_complete_precopy together with a new save_live_complete_postcopy method on devices. The save_live_complete_precopy method is called on all devices during a precopy migration, and all non-postcopy devices during a postcopy migration at the transition. The save_live_complete_postcopy method is called at the end of postcopy for all postcopiable devices. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Modify save_live_pending to return separate postcopiable and non-postcopiable counts. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the 'complete's to make the difference obvious. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
The main RAM load loop has a call to host_from_stream_offset for each page type that actually loads data with the same test; factor it out before the switch. The host = NULL is to silence a bogus gcc warning of an unitialised in the RAM_SAVE_COMPRESS_PAGE case, it doesn't seem to realise that host is always initialised by the if at the top in the cases the switch takes. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Useful for debugging the migration bitmap and other bitmaps of the same format (including the sentmap in postcopy). The bitmap is printed to stderr. Lines that are all the expected value are excluded so the output can be quite compact for many bitmaps. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Add a function to find a RAMBlock by name; use it in two of the places that already open code that loop; we've got another use later in postcopy. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 04 11月, 2015 3 次提交
-
-
由 Liang Li 提交于
Just clean up code, no behavior change. Signed-off-by: NLiang Li <liang.z.li@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Reviewed-by: Amit Shah <amit.shah@redhat.com>al3 Signed-off-by: Juan Quintela <quintela@redhat.com>al3
-
由 Liang Li 提交于
'cleanup' seems more appropriate than 'cancel'. Signed-off-by: NLiang Li <liang.z.li@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Reviewed-by: Amit Shah <amit.shah@redhat.com>al3 Signed-off-by: Juan Quintela <quintela@redhat.com>al3
-
由 Liang Li 提交于
Because of the patch 3ea3b7fa9af067982f34b of kvm, which introduces a lazy collapsing of small sptes into large sptes mechanism, now migration_end() is a time consuming operation because it calls memroy_global_dirty_log_stop(), which will trigger the dropping of small sptes operation and takes about dozens of milliseconds, so call migration_end() before all the vmsate data has already been transferred to the destination will prolong VM downtime. This operation should be deferred after all the data has been transferred to the destination. blk_mig_cleanup() can be deferred too. For a VM with 8G RAM, this patch can reduce the VM downtime about 30 ms. Signed-off-by: NLiang Li <liang.z.li@intel.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>al3 Reviewed-by: Amit Shah <amit.shah@redhat.com>al3 Signed-off-by: Juan Quintela <quintela@redhat.com>al3
-
- 15 10月, 2015 1 次提交
-
-
由 Denis V. Lunev 提交于
Release qemu global mutex before call synchronize_rcu(). synchronize_rcu() waiting for all readers to finish their critical sections. There is at least one critical section in which we try to get QGM (critical section is in address_space_rw() and prepare_mmio_access() is trying to aquire QGM). Both functions (migration_end() and migration_bitmap_extend()) are called from main thread which is holding QGM. Thus there is a race condition that ends up with deadlock: main thread working thread Lock QGA | | Call KVM_EXIT_IO handler | | | Open rcu reader's critical section Migration cleanup bh | | | synchronize_rcu() is | waiting for readers | | prepare_mmio_access() is waiting for QGM \ / deadlock The patch changes bitmap freeing from direct g_free after synchronize_rcu to free inside call_rcu. Signed-off-by: NDenis V. Lunev <den@openvz.org> Reported-by: NIgor Redko <redkoi@virtuozzo.com> Tested-by: NIgor Redko <redkoi@virtuozzo.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com> CC: Anna Melekhova <annam@virtuozzo.com> CC: Juan Quintela <quintela@redhat.com> CC: Amit Shah <amit.shah@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Wen Congyang <wency@cn.fujitsu.com>
-
- 30 9月, 2015 1 次提交
-
-
由 Jason J. Herne 提交于
Remove traditional auto-converge static 30ms throttling code and replace it with a dynamic throttling algorithm. Additionally, be more aggressive when deciding when to start throttling. Previously we waited until four unproductive memory passes. Now we begin throttling after only two unproductive memory passes. Four seemed quite arbitrary and only waiting for two passes allows us to complete the migration faster. Signed-off-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com>
-
- 29 9月, 2015 3 次提交
-
-
由 Dr. David Alan Gilbert 提交于
Split out the finding of the dirty page and all the wrap detection into a separate function since it was getting a bit hairy. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <1443018431-11170-3-git-send-email-dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> [Fix comment -- Amit] Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Pull the search state for one iteration of the dirty page search into a structure. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Message-Id: <1443018431-11170-2-git-send-email-dgilbert@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
RAM migration mainly works on RAMBlocks but in a few places uses data from MemoryRegions to access the same information that's already held in RAMBlocks; clean it up just to avoid the MemoryRegion use. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <1439463094-5394-2-git-send-email-dgilbert@redhat.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 15 7月, 2015 1 次提交
-
-
由 Liang Li 提交于
'strlen' is called three times in 'save_page_header', it's inefficient. Signed-off-by: NLiang Li <liang.z.li@intel.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-