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] [PV Xen] Mouse stuck after save/restore of guest

To: Igor Mammedov <imammedo@xxxxxxxxxx>, olaf@xxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] [PV Xen] Mouse stuck after save/restore of guest.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 14 Apr 2011 11:59:15 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Apr 2011 09:06:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1302795907-321-1-git-send-email-imammedo@xxxxxxxxxx>
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: <1302795907-321-1-git-send-email-imammedo@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
On Thu, Apr 14, 2011 at 05:45:07PM +0200, Igor Mammedov wrote:
>     Mouse stuck after restore of PV guest but buttons are
>     in working condition.
>     If driver has been configured for ABS coordinates at
>     start it will get XENKBD_TYPE_POS events and then
>     suddenly after restore it'll start getting
>     XENKBD_TYPE_MOTION events, that will be dropped later
>     and they won't get into user-space.
> 
>     Regression was introduced by hunk 5 and 6 of 5ea5254
>     in upstream.
> 
>     Driver on restore should ask xen for request-abs-pointer
>     again if it's available. So restore parts that did it 
>     before 5ea5254.

Olaf?

> ---
>  drivers/input/xen-kbdfront.c |   14 +++++++++++++-
>  1 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
> index 53e6273..71e2fc5 100644
> --- a/drivers/input/xen-kbdfront.c
> +++ b/drivers/input/xen-kbdfront.c
> @@ -286,7 +286,7 @@ static void xenkbd_backend_changed(struct xenbus_device 
> *dev,
>                                  enum xenbus_state backend_state)
>  {
>       struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
> -     int val;
> +     int ret, val;
>  
>       switch (backend_state) {
>       case XenbusStateInitialising:
> @@ -299,6 +299,18 @@ static void xenkbd_backend_changed(struct xenbus_device 
> *dev,
>  
>       case XenbusStateInitWait:
>  InitWait:
> +             ret = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
> +                                   "feature-abs-pointer", "%d", &val);
> +                if (ret < 0)
> +                        val = 0;
> +                if (val) {
> +                        ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
> +                                            "request-abs-pointer", "1");
> +                        if (ret)
> +                                printk(KERN_WARNING
> +                                       "xenkbd: can't request abs-pointer");

Any reason for not using the pr_warning as it was before?
> +                }
> +
>               xenbus_switch_state(dev, XenbusStateConnected);
>               break;
>  
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

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