summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorDominik Dingel <dingel@linux.vnet.ibm.com>2013-09-03 12:31:16 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-01-30 12:52:20 +0100
commit9f2ceda49c6b8827c795731c204f6c2587886e2c (patch)
tree66d50d1720dd389f12f1e8b318e1ba7cb3e597e0 /virt
parente0ead41a6dac09f86675ce07a66e4b253a9b7bd5 (diff)
downloadlinux-9f2ceda49c6b8827c795731c204f6c2587886e2c.tar.bz2
KVM: async_pf: Allow to wait for outstanding work
On s390 we are not able to cancel work. Instead we will flush the work and wait for completion. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/async_pf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index 00980ab02c45..889aad022014 100644
--- a/virt/kvm/async_pf.c
+++ b/virt/kvm/async_pf.c
@@ -113,11 +113,16 @@ void kvm_clear_async_pf_completion_queue(struct kvm_vcpu *vcpu)
list_entry(vcpu->async_pf.queue.next,
typeof(*work), queue);
list_del(&work->queue);
+
+#ifdef CONFIG_KVM_ASYNC_PF_SYNC
+ flush_work(&work->work);
+#else
if (cancel_work_sync(&work->work)) {
mmdrop(work->mm);
kvm_put_kvm(vcpu->kvm); /* == work->vcpu->kvm */
kmem_cache_free(async_pf_cache, work);
}
+#endif
}
spin_lock(&vcpu->async_pf.lock);