summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-03-06 12:03:26 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-17 17:08:33 +0100
commitc8ce057eafd49da6a7afe7791bd84163f65f6132 (patch)
treea40cff496f6ee5e2857509af0a2c1ccd89f7db1e
parentKVM: MMU: remove unused macros (diff)
downloadlinux-c8ce057eafd49da6a7afe7791bd84163f65f6132.tar.xz
linux-c8ce057eafd49da6a7afe7791bd84163f65f6132.zip
KVM: improve comment on rcu use in irqfd_deassign
The RCU use in kvm_irqfd_deassign is tricky: we have rcu_assign_pointer but no synchronize_rcu: synchronize_rcu is done by kvm_irq_routing_update which we share a spinlock with. Fix up a comment in an attempt to make this clearer. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--virt/kvm/eventfd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 2ca4535f4fb7..3656849f78a0 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -313,8 +313,9 @@ kvm_irqfd_deassign(struct kvm *kvm, int fd, int gsi)
if (irqfd->eventfd == eventfd && irqfd->gsi == gsi) {
/*
* This rcu_assign_pointer is needed for when
- * another thread calls kvm_irqfd_update before
- * we flush workqueue below.
+ * another thread calls kvm_irq_routing_update before
+ * we flush workqueue below (we synchronize with
+ * kvm_irq_routing_update using irqfds.lock).
* It is paired with synchronize_rcu done by caller
* of that function.
*/