From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 4/5] KVM: remove make_all_cpus_request
Date: Wed, 26 Aug 2009 22:20:04 -0300 [thread overview]
Message-ID: <20090827012955.402689034@localhost.localdomain> (raw)
In-Reply-To: 20090827012000.762063112@localhost.localdomain
[-- Attachment #1: remove-make-all-vcpus-request --]
[-- Type: text/plain, Size: 1899 bytes --]
Obsoleted by kvm_vcpus_request
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: kvm/virt/kvm/kvm_main.c
===================================================================
--- kvm.orig/virt/kvm/kvm_main.c
+++ kvm/virt/kvm/kvm_main.c
@@ -142,40 +142,6 @@ void kvm_vcpu_ipi(struct kvm_vcpu *vcpu)
put_cpu();
}
-static void ack_flush(void *_completed)
-{
-}
-
-static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
-{
- int i, cpu, me;
- cpumask_var_t cpus;
- bool called = true;
- struct kvm_vcpu *vcpu;
-
- if (alloc_cpumask_var(&cpus, GFP_ATOMIC))
- cpumask_clear(cpus);
-
- spin_lock(&kvm->requests_lock);
- me = smp_processor_id();
- kvm_for_each_vcpu(i, vcpu, kvm) {
- if (test_and_set_bit(req, &vcpu->requests))
- continue;
- cpu = vcpu->cpu;
- if (cpus != NULL && cpu != -1 && cpu != me)
- cpumask_set_cpu(cpu, cpus);
- }
- if (unlikely(cpus == NULL))
- smp_call_function_many(cpu_online_mask, ack_flush, NULL, 1);
- else if (!cpumask_empty(cpus))
- smp_call_function_many(cpus, ack_flush, NULL, 1);
- else
- called = false;
- spin_unlock(&kvm->requests_lock);
- free_cpumask_var(cpus);
- return called;
-}
-
static int kvm_req_wait(void *unused)
{
cpu_relax();
@@ -415,7 +381,6 @@ static struct kvm *kvm_create_vm(void)
kvm->mm = current->mm;
atomic_inc(&kvm->mm->mm_count);
spin_lock_init(&kvm->mmu_lock);
- spin_lock_init(&kvm->requests_lock);
kvm_io_bus_init(&kvm->pio_bus);
kvm_eventfd_init(kvm);
mutex_init(&kvm->lock);
Index: kvm/include/linux/kvm_host.h
===================================================================
--- kvm.orig/include/linux/kvm_host.h
+++ kvm/include/linux/kvm_host.h
@@ -157,7 +157,6 @@ struct kvm_irq_routing_table {};
struct kvm {
spinlock_t mmu_lock;
- spinlock_t requests_lock;
struct rw_semaphore slots_lock;
struct mm_struct *mm; /* userspace tied to this vm */
int nmemslots;
--
next prev parent reply other threads:[~2009-08-27 1:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 1:20 [patch 0/5] unify remote request and kvm_vcpu_kick IPI mechanism Marcelo Tosatti
2009-08-27 1:20 ` [patch 1/5] KVM: move kvm_vcpu_kick to virt/kvm/kvm_main.c Marcelo Tosatti
2009-08-27 1:20 ` [patch 2/5] KVM: reintroduce guest mode bit and unify remote request code Marcelo Tosatti
2009-08-27 8:15 ` Avi Kivity
2009-08-27 12:45 ` Marcelo Tosatti
2009-08-27 13:24 ` Avi Kivity
2009-08-27 14:07 ` Marcelo Tosatti
2009-08-28 7:06 ` Avi Kivity
2009-08-28 7:22 ` Avi Kivity
2009-08-27 8:25 ` Avi Kivity
2009-08-27 12:58 ` Marcelo Tosatti
2009-08-27 1:20 ` [patch 3/5] KVM: switch REQ_TLB_FLUSH/REQ_MMU_RELOAD to kvm_vcpus_request Marcelo Tosatti
2009-08-27 1:20 ` Marcelo Tosatti [this message]
2009-08-27 1:20 ` [patch 5/5] KVM: x86: drop duplicat kvm_flush_remote_tlbs Marcelo Tosatti
2009-08-27 15:54 ` [RFC] KVM: x86: conditionally acquire/release slots_lock on entry/exit Marcelo Tosatti
2009-08-27 16:27 ` Avi Kivity
2009-08-27 22:59 ` Marcelo Tosatti
2009-08-28 6:50 ` Avi Kivity
2009-09-10 22:30 ` Marcelo Tosatti
2009-09-13 15:42 ` Avi Kivity
2009-09-13 16:26 ` Paul E. McKenney
2009-09-13 22:49 ` Marcelo Tosatti
2009-09-14 5:03 ` Avi Kivity
2009-09-14 7:17 ` Avi Kivity
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=20090827012955.402689034@localhost.localdomain \
--to=mtosatti@redhat.com \
--cc=kvm@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox