All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Gleb Natapov <gleb@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Alexander Graf <agraf@suse.de>,
	Dominik Dingel <dingel@linux.vnet.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>
Subject: [PULL 6/8] KVM: async_pf: Allow to wait for outstanding work
Date: Thu, 30 Jan 2014 13:53:47 +0100	[thread overview]
Message-ID: <1391086429-43935-7-git-send-email-borntraeger@de.ibm.com> (raw)
In-Reply-To: <1391086429-43935-1-git-send-email-borntraeger@de.ibm.com>

From: Dominik Dingel <dingel@linux.vnet.ibm.com>

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>
---
 virt/kvm/async_pf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index 00980ab..889aad0 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);
-- 
1.8.4.2

  parent reply	other threads:[~2014-01-30 12:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 12:53 [PULL 0/8] KVM: s390: floating interrupt controller and asyncpf Christian Borntraeger
2014-01-30 12:53 ` [PULL 1/8] KVM: s390: add and extend interrupt information data structs Christian Borntraeger
2014-01-30 12:53 ` [PULL 2/8] KVM: s390: add floating irq controller Christian Borntraeger
2014-01-30 12:53 ` [PULL 3/8] KVM: s390: limit floating irqs Christian Borntraeger
2014-01-30 12:53 ` [PULL 4/8] KVM: s390: Add FAULT_FLAG_RETRY_NOWAIT for guest fault Christian Borntraeger
2014-01-30 12:53 ` [PULL 5/8] KVM: async_pf: Provide additional direct page notification Christian Borntraeger
2014-01-31 11:38   ` Paolo Bonzini
2014-01-31 12:24     ` Christian Borntraeger
2014-01-31 13:13       ` Paolo Bonzini
2014-01-31 13:32       ` [PATCH] Fixup for patch 5 Christian Borntraeger
2014-01-31 13:32         ` [PATCH] KVM: async_pf: Add missing call for async page present Christian Borntraeger
2014-01-31 14:58         ` [PATCH] Fixup for patch 5 Paolo Bonzini
2014-01-30 12:53 ` Christian Borntraeger [this message]
2014-01-30 12:53 ` [PULL 7/8] KVM: async_pf: Async page fault support on s390 Christian Borntraeger
2014-01-30 12:53 ` [PULL 8/8] KVM: async_pf: Exploit one reg interface for pfault Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391086429-43935-7-git-send-email-borntraeger@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dingel@linux.vnet.ibm.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.