WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Xenconsoled should ignore spurious watch event. Othe

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Xenconsoled should ignore spurious watch event. Otherwise, it can rebind to the same evtchn of a dying domU during suspending and cause below error message:
From: john.levon@xxxxxxx
Date: Mon, 19 Feb 2007 20:45:12 -0700
Delivery-date: Mon, 19 Feb 2007 20:45:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1171946682 28800
# Node ID e8a7491ed4c57d4d82642dd954b8909d9065b377
# Parent  24a6bc1d1b93405558741a2a8fa7ba2f7c44964a
Xenconsoled should ignore spurious watch event. Otherwise, it can rebind to the 
same evtchn of a dying domU during suspending and cause below error message:
(XEN) event_channel.c:177:d0 EVTCHNOP failure: domain 0, error -22, line 177

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -66,6 +66,7 @@ struct domain
        char *conspath;
        int ring_ref;
        evtchn_port_t local_port;
+       evtchn_port_t remote_port;
        int xce_handle;
        struct xencons_interface *interface;
 };
@@ -290,6 +291,9 @@ static int domain_create_ring(struct dom
        if (err)
                goto out;
 
+       if ((ring_ref == dom->ring_ref) && (remote_port == dom->remote_port))
+               goto out;
+
        if (ring_ref != dom->ring_ref) {
                if (dom->interface != NULL)
                        munmap(dom->interface, getpagesize());
@@ -305,6 +309,7 @@ static int domain_create_ring(struct dom
        }
 
        dom->local_port = -1;
+       dom->remote_port = -1;
        if (dom->xce_handle != -1)
                xc_evtchn_close(dom->xce_handle);
 
@@ -326,6 +331,7 @@ static int domain_create_ring(struct dom
                goto out;
        }
        dom->local_port = rc;
+       dom->remote_port = remote_port;
 
        if (dom->tty_fd == -1) {
                dom->tty_fd = domain_create_tty(dom);
@@ -335,6 +341,7 @@ static int domain_create_ring(struct dom
                        xc_evtchn_close(dom->xce_handle);
                        dom->xce_handle = -1;
                        dom->local_port = -1;
+                       dom->remote_port = -1;
                        goto out;
                }
        }
@@ -392,6 +399,7 @@ static struct domain *create_domain(int 
 
        dom->ring_ref = -1;
        dom->local_port = -1;
+       dom->remote_port = -1;
        dom->interface = NULL;
        dom->xce_handle = -1;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Xenconsoled should ignore spurious watch event. Otherwise, it can rebind to the same evtchn of a dying domU during suspending and cause below error message:, john . levon <=