diff options
author | Dominik Dingel <dingel@linux.vnet.ibm.com> | 2013-09-03 06:31:16 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-01-30 06:52:20 -0500 |
commit | 9f2ceda49c6b8827c795731c204f6c2587886e2c (patch) | |
tree | 66d50d1720dd389f12f1e8b318e1ba7cb3e597e0 /virt/kvm/async_pf.c | |
parent | e0ead41a6dac09f86675ce07a66e4b253a9b7bd5 (diff) |
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/kvm/async_pf.c')
-rw-r--r-- | virt/kvm/async_pf.c | 5 |
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) | |||
113 | list_entry(vcpu->async_pf.queue.next, | 113 | list_entry(vcpu->async_pf.queue.next, |
114 | typeof(*work), queue); | 114 | typeof(*work), queue); |
115 | list_del(&work->queue); | 115 | list_del(&work->queue); |
116 | |||
117 | #ifdef CONFIG_KVM_ASYNC_PF_SYNC | ||
118 | flush_work(&work->work); | ||
119 | #else | ||
116 | if (cancel_work_sync(&work->work)) { | 120 | if (cancel_work_sync(&work->work)) { |
117 | mmdrop(work->mm); | 121 | mmdrop(work->mm); |
118 | kvm_put_kvm(vcpu->kvm); /* == work->vcpu->kvm */ | 122 | kvm_put_kvm(vcpu->kvm); /* == work->vcpu->kvm */ |
119 | kmem_cache_free(async_pf_cache, work); | 123 | kmem_cache_free(async_pf_cache, work); |
120 | } | 124 | } |
125 | #endif | ||
121 | } | 126 | } |
122 | 127 | ||
123 | spin_lock(&vcpu->async_pf.lock); | 128 | spin_lock(&vcpu->async_pf.lock); |