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

Re: [Xen-devel] [PATCH] fbfront: advertise either absolute or relative c

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] fbfront: advertise either absolute or relative coordinates
From: Eamon Walsh <ewalsh@xxxxxxxxxxxxx>
Date: Thu, 10 Mar 2011 14:58:17 -0500
Cc: Olaf Hering <olaf@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 10 Mar 2011 12:00:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1103101912200.2968@kaball-desktop>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20110310175822.GA32033@xxxxxxxxx> <alpine.DEB.2.00.1103101808190.2968@kaball-desktop> <20110310181404.GA3333@xxxxxxxxx> <alpine.DEB.2.00.1103101912200.2968@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7
We have had an issue here where the "request-abs-pointer" key is appearing in 
XenStore _after_ the backend has gone to the Connected state.  Qemu xenfb.c 
checks for this key in the "connect()" callback, causing it to miss the key and 
default to relative coordinates.

xen be: vkbd-0: frontend update: page-ref
xen be: vkbd-0: frontend not ready (yet)
xen be: vkbd-0: frontend update: page-gref
xen be: vkbd-0: frontend not ready (yet)
xen be: vkbd-0: frontend update: event-channel
xen be: vkbd-0: frontend not ready (yet)
xen be: vkbd-0: frontend state: Initialising -> Initialised
xen be: vkbd-0: frontend update: state
xen be: vkbd-0: bind evtchn port 53
xen be: vkbd-0: ring ref 13, remote-port 11, local-port 53
xen be: vkbd-0: backend state: InitWait -> Connected               <----
xen be: vkbd-0: backend update: state
xen be: vkbd-0: frontend update: request-abs-pointer               <----
xen be: vkbd-0: frontend state: Initialised -> Connected
xen be: vkbd-0: frontend update: state


This could be a problem specific to our display server, and it only happens 
sometimes. But we have been carrying the patch below in our xenfb.c.  It makes 
sense to respond to a direct watch on the key itself instead of looking for it 
at a state change.  This may be suitable for upstream to Qemu.

I also note that the check in Qemu was previously made even before the 
connected state.  It was changed in July, see:
http://web.archiveorange.com/archive/v/1XS1v5z9uIQLGujGBDhT


diff --git a/src/xenfb.c b/src/xenfb.c
index a822057..5aade4c 100644
--- a/src/xenfb.c
+++ b/src/xenfb.c
@@ -181,10 +181,6 @@ static int input_connect(struct XenDevice *xendev)
     struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
     int rc;
 
-    if (xenstore_read_fe_int(xendev, "request-abs-pointer",
-                             &in->abs_pointer_wanted) == -1)
-       in->abs_pointer_wanted = 0;
-
     rc = common_bind(&in->c);
     if (rc != 0)
        return rc;
@@ -199,6 +195,17 @@ static void input_disconnect(struct XenDevice *xendev)
     xen_linpicker_input_disconnect(in);
 }
 
+static void input_frontend_changed(struct XenDevice *xendev, const char *node)
+{
+    struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
+
+    if (strcmp(node, "request-abs-pointer") == 0) {
+       if (xenstore_read_fe_int(xendev, "request-abs-pointer",
+                                &in->abs_pointer_wanted) < 0)
+           in->abs_pointer_wanted = 0;
+    }
+}
+
 static void input_event(struct XenDevice *xendev)
 {
     struct XenInput *xenfb = container_of(xendev, struct XenInput, c.xendev);
@@ -754,6 +761,7 @@ struct XenDevOps xen_kbdmouse_ops = {
     .connect    = input_connect,
     .disconnect = input_disconnect,
     .event      = input_event,
+    .frontend_changed = input_frontend_changed,
 };
 
 struct XenDevOps xen_framebuffer_ops = {


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