[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] notify_via_xen_event_channel() takes explicit domain parameter.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275643545 -3600
# Node ID 936f4c08eaefc9d5bd07bb4d196e9ccb89b2d6aa
# Parent  48e2b07cf01c044bf483bd7fa5408a6f9801416b
notify_via_xen_event_channel() takes explicit domain parameter.

Also remove pointless tasklet from mem_event notify path.

Signed-off-by: John Byrne <john.l.byrne@xxxxxx>
---
 xen/arch/ia64/vmx/vmx_support.c |    2 +-
 xen/arch/x86/hvm/hvm.c          |    2 +-
 xen/arch/x86/mm/mem_event.c     |   14 +-------------
 xen/common/event_channel.c      |    4 ++--
 xen/include/xen/event.h         |    2 +-
 xen/include/xen/sched.h         |    2 --
 6 files changed, 6 insertions(+), 20 deletions(-)

diff -r 48e2b07cf01c -r 936f4c08eaef xen/arch/ia64/vmx/vmx_support.c
--- a/xen/arch/ia64/vmx/vmx_support.c   Fri Jun 04 10:18:31 2010 +0100
+++ b/xen/arch/ia64/vmx/vmx_support.c   Fri Jun 04 10:25:45 2010 +0100
@@ -62,7 +62,7 @@ void vmx_send_assist_req(struct vcpu *v)
     }
     wmb();
     p->state = STATE_IOREQ_READY;
-    notify_via_xen_event_channel(v->arch.arch_vmx.xen_port);
+    notify_via_xen_event_channel(v->domain, v->arch.arch_vmx.xen_port);
 
     for (;;) {
         if (p->state != STATE_IOREQ_READY &&
diff -r 48e2b07cf01c -r 936f4c08eaef xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Fri Jun 04 10:18:31 2010 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Fri Jun 04 10:25:45 2010 +0100
@@ -930,7 +930,7 @@ bool_t hvm_send_assist_req(struct vcpu *
      * prepare_wait_on_xen_event_channel() is an implicit barrier.
      */
     p->state = STATE_IOREQ_READY;
-    notify_via_xen_event_channel(v->arch.hvm_vcpu.xen_port);
+    notify_via_xen_event_channel(v->domain, v->arch.hvm_vcpu.xen_port);
 
     return 1;
 }
diff -r 48e2b07cf01c -r 936f4c08eaef xen/arch/x86/mm/mem_event.c
--- a/xen/arch/x86/mm/mem_event.c       Fri Jun 04 10:18:31 2010 +0100
+++ b/xen/arch/x86/mm/mem_event.c       Fri Jun 04 10:25:45 2010 +0100
@@ -33,13 +33,6 @@
 
 
 #define MEM_EVENT_RING_THRESHOLD 4
-
-
-static void mem_event_notify(struct domain *d)
-{
-    prepare_wait_on_xen_event_channel(d->mem_event.xen_port);
-    notify_via_xen_event_channel(d->mem_event.xen_port);
-}
 
 
 int mem_event_enable(struct domain *d, mfn_t ring_mfn, mfn_t shared_mfn)
@@ -63,11 +56,6 @@ int mem_event_enable(struct domain *d, m
 
     ((mem_event_shared_page_t *)d->mem_event.shared_page)->port = rc;
     d->mem_event.xen_port = rc;
-
-    /* Initialise tasklet */
-    tasklet_init(&d->mem_event.tasklet,
-                 (void(*)(unsigned long))mem_event_notify,
-                 (unsigned long)d);
 
     /* Prepare ring buffer */
     FRONT_RING_INIT(&d->mem_event.front_ring,
@@ -125,7 +113,7 @@ void mem_event_put_request(struct domain
 
     mem_event_ring_unlock(d);
 
-    tasklet_schedule(&d->mem_event.tasklet);
+    notify_via_xen_event_channel(d, d->mem_event.xen_port);
 }
 
 void mem_event_get_response(struct domain *d, mem_event_response_t *rsp)
diff -r 48e2b07cf01c -r 936f4c08eaef xen/common/event_channel.c
--- a/xen/common/event_channel.c        Fri Jun 04 10:18:31 2010 +0100
+++ b/xen/common/event_channel.c        Fri Jun 04 10:25:45 2010 +0100
@@ -986,10 +986,10 @@ void free_xen_event_channel(
 }
 
 
-void notify_via_xen_event_channel(int lport)
+void notify_via_xen_event_channel(struct domain *ld, int lport)
 {
     struct evtchn *lchn, *rchn;
-    struct domain *ld = current->domain, *rd;
+    struct domain *rd;
     int            rport;
 
     spin_lock(&ld->event_lock);
diff -r 48e2b07cf01c -r 936f4c08eaef xen/include/xen/event.h
--- a/xen/include/xen/event.h   Fri Jun 04 10:18:31 2010 +0100
+++ b/xen/include/xen/event.h   Fri Jun 04 10:25:45 2010 +0100
@@ -57,7 +57,7 @@ int guest_enabled_event(struct vcpu *v, 
 int guest_enabled_event(struct vcpu *v, int virq);
 
 /* Notify remote end of a Xen-attached event channel.*/
-void notify_via_xen_event_channel(int lport);
+void notify_via_xen_event_channel(struct domain *ld, int lport);
 
 /* Wait on a Xen-attached event channel. */
 #define wait_on_xen_event_channel(port, condition)                      \
diff -r 48e2b07cf01c -r 936f4c08eaef xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   Fri Jun 04 10:18:31 2010 +0100
+++ b/xen/include/xen/sched.h   Fri Jun 04 10:25:45 2010 +0100
@@ -190,8 +190,6 @@ struct mem_event_domain
     bool_t enabled;
     /* event channel port (vcpu0 only) */
     int xen_port;
-    /* tasklet */
-    struct tasklet tasklet;
 };
  
 struct domain

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.