]> git.ipfire.org Git - thirdparty/qemu.git/commit
kvm: Reallocate dirty_bmap when we change a slot
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 21 Nov 2019 16:56:45 +0000 (16:56 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 22 Jun 2020 17:15:37 +0000 (12:15 -0500)
commit1343d333714e9ff5482d31950cc87890e391ab7b
tree2eadd679ace1cecd31db0aced82897e28bb51cc0
parentc436692c6a229f35db1fe24ba60fe04013d92b25
kvm: Reallocate dirty_bmap when we change a slot

kvm_set_phys_mem can be called to reallocate a slot by something the
guest does (e.g. writing to PAM and other chipset registers).
This can happen in the middle of a migration, and if we're unlucky
it can now happen between the split 'sync' and 'clear'; the clear
asserts if there's no bmap to clear.   Recreate the bmap whenever
we change the slot, keeping the clear path happy.

Typically this is triggered by the guest rebooting during a migrate.

Corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=1772774
https://bugzilla.redhat.com/show_bug.cgi?id=1771032

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
(cherry picked from commit 9b3a31c745b61758aaa5466a3a9fc0526d409188)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
accel/kvm/kvm-all.c