@serge-hallyn,

This patch is exactly what fixes the problem for me (was able to do
around 150 successful migrations with it).

However, this should be rewritten to only contain exactly calls to
tlb_flush when in TCG mode so there is no extra code and no unrelated
changes.


The reason patches are different is quite reworked migration and dirtying 
mechanisms in new QEMU.

In exactly, new QEMU KVM has no `log_global_start' handler and the
regions are to be marked as DIRTY_MEMORY_MIGRATE by the `log_start'
handlers which are called only starting with the referenced patch in
upstream. This call is done deeply in memory_region_transaction_commit
-> address_space_update_topology -> *_pass.

Regarding the DIRTY_MEMORY_CODE, in the 2.0.0 it is used only inside the
TCG-related code. Every time a TranslationBlock code is generated for a
given VM code the pages of VM code are removed from TLB cache and marked
as 'clean'. So, on next write to the VM code pages the TLB will be
missed and the TranslationBlock will be updated accordingly.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1493049

Title:
  memory corruption during live-migration in TCG mode

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1493049/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to