All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mm: Make sure the event channel is released accurately
@ 2012-02-17  7:15 hongkaixing
  2012-02-17  7:38 ` Olaf Hering
  0 siblings, 1 reply; 2+ messages in thread
From: hongkaixing @ 2012-02-17  7:15 UTC (permalink / raw)
  To: Olaf Hering; +Cc: bicky.shi, xiaowei.yang, xen-devel, yanqiangjun, hanweidong

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1379 bytes --]

# HG changeset patch
# User h00166998@h00166998.china.huawei.com
# 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@huawei.com>,
Signed-off-by£ºZhen Shi <bicky.shi@huawei.com>

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;
 


[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-17  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17  7:15 [PATCH] x86/mm: Make sure the event channel is released accurately hongkaixing
2012-02-17  7:38 ` Olaf Hering

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.