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

[Xen-devel] [PATCH] x86/mm: Make sure the event channel is released accurately



# HG changeset patch
# User h00166998@xxxxxxxxxxxxxxxxxxxxxxxxxx
# Date 1329462865 -28800
# Node ID 9fd12f919ddbd15927117eff42149664dba698ca
# Parent  b75664e5390583c5d2075c82a14245bc941b3aaf
x86/mm: Make sure the event channel is released accurately

    In xenpaging source code,there is an interdomain communication between dom0
and domU. In mem_event_enable(),the function alloc_unbound_xen_event_channel()
allocates a free port for domU, and then it will be bound with dom0.
When xenpaging tears down,it just frees dom0's event channel port by
xc_evtchn_unbind(), leaves domU's port still occupied.
    So we add the patch to free domU's port when xenpaging exits.
We need double free interdomain eventchannel. First free domainU port,
and leave domain 0 port unbond, Then free domain 0 port.

Signed-off-by£ºKaixing Hong <hongkaixing@xxxxxxxxxx>,
Signed-off-by£ºZhen Shi <bicky.shi@xxxxxxxxxx>

diff -r b75664e53905 -r 9fd12f919ddb xen/arch/x86/mm/mem_event.c
--- a/xen/arch/x86/mm/mem_event.c       Thu Feb 16 15:43:02 2012 +0000
+++ b/xen/arch/x86/mm/mem_event.c       Fri Feb 17 15:14:25 2012 +0800
@@ -243,6 +243,9 @@
             return -EBUSY;
         }
 
+        /* Free domU's event channel and leave the other one unbound */
+        free_xen_event_channel(d->vcpu[0], med->xen_port);
+        
         unmap_domain_page(med->ring_page);
         med->ring_page = NULL;
 

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

 


Rackspace

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