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
|