From mboxrd@z Thu Jan 1 00:00:00 1970 From: Owen Smith Subject: Re: [PATCH] kbdif.h: Introduce feature-vkbd-standalone Date: Tue, 13 Jun 2017 14:59:04 +0000 Message-ID: References: <1496927343-29065-1-git-send-email-owen.smith@citrix.com>, <6e47da4b-f62e-78ac-8d14-97b75da0fcbb@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7644670922546605104==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKnHg-0000eK-2D for xen-devel@lists.xenproject.org; Tue, 13 Jun 2017 14:59:08 +0000 In-Reply-To: <6e47da4b-f62e-78ac-8d14-97b75da0fcbb@gmail.com> Content-Language: en-GB List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Oleksandr Andrushchenko , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org --===============7644670922546605104== Content-Language: en-GB Content-Type: multipart/alternative; boundary="_000_dc9e3885a4d34fc082a6f9d34aff56c1AMSPEX02CL02citritenet_" --_000_dc9e3885a4d34fc082a6f9d34aff56c1AMSPEX02CL02citritenet_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Oleksandr, The reason I=92m proposing the additional feature flag is to differentiate = between older, broken, backends that will not connect without the vfb device (qemu-upstream=92s implementation in hw/display/xenfb.c) and fixed backends (like patches I=92ve posted to fix the qemu backend). Without a differentia= tor, a frontend I=92ve developed will get stuck waiting for the backend to conne= ct, and under Windows this effectively hangs the system. The Qemu backend should be fixed to make the vkbd and vfb independent devices. This proposal will help detect an incompatible backend and avoid a VM hang. (frontend WIP: http://xenbits.xen.org/gitweb/?p=3Dpvdrivers/win/xenvkbd.git= ;a=3Dtree) Owen From: Oleksandr Andrushchenko Sent: 12 June 2017 08:07 To: Owen Smith; xen-devel@lists.xenproject.or= g Subject: Re: [Xen-devel] [PATCH] kbdif.h: Introduce feature-vkbd-standalone Hi, Owen! On 06/08/2017 04:09 PM, Owen Smith wrote: > Backends set "feature-vkbd-standalone" to 1 if they can connect > without waiting for the PV framebuffer. If this value is missing > or not 1, then a backend will wait for the PV framebuffer before > connecting, potentially causing the frontend to wait indefinitely. This means that by the new option we *fix an existing backend* and its particular behavior. What is more, we introduce knowledge of virtual fb into generic virtual kbd/ptr protocol which seems to be not correct (IMO). For the reasons above, I would recommend fixing the corresponding backend instead, for example by configuring it appropriately wrt use-case you have. > Frontends set "request-vkbd-standalone" to 1 to request that the > backend does not wait for the PV framebuffer. Frontends that > require a standalone vkbd device should not attempt to connect > unless the backend advertises "feature-vkbd-standalone", and > should set "request-vkbd-standalone". Again, this looks very use-case specific > Backends that are standalone (i.e. do not have an associated PV > framebuffer) do not rescale absolute mouse or touch coordinates > to a the size of the (non-existant) PV framebuffer, and use the > range of [0, 0x7fff] for absolute values. > > Signed-off-by: Owen Smith > --- > xen/include/public/io/kbdif.h | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/xen/include/public/io/kbdif.h b/xen/include/public/io/kbdif.= h > index dcbd71a..ca09080 100644 > --- a/xen/include/public/io/kbdif.h > +++ b/xen/include/public/io/kbdif.h > @@ -63,6 +63,12 @@ > * Backends, which support reporting of multi-touch events > * should set this to 1. > * > + * feature-vkbd-standalone > + * Values: > + * > + * Backends, which support a standalone vkbd, without requiring a v= fb > + * device, should set this to 1. > + * > *------------------------- Pointer Device Parameters -----------------= ------- > * > * width > @@ -98,6 +104,13 @@ > * > * Request backend to report multi-touch events. > * > + * request-vkbd-standalone > + * Values: > + * > + * Request backend to connect vkbd device without waiting for the > + * vfb device. Any absolute coordinates will NOT be scaled to > + * screen size, and will remain in the range [0, 0x7fff] > + * > *----------------------- Request Transport Parameters ----------------= ------- > * > * event-channel > @@ -165,8 +178,10 @@ > > #define XENKBD_FIELD_FEAT_ABS_POINTER "feature-abs-pointer" > #define XENKBD_FIELD_FEAT_MTOUCH "feature-multi-touch" > +#define XENKBD_FIELD_FEAT_STANDALONE "feature-vkbd-standalone" > #define XENKBD_FIELD_REQ_ABS_POINTER "request-abs-pointer" > #define XENKBD_FIELD_REQ_MTOUCH "request-multi-touch" > +#define XENKBD_FIELD_REQ_STANDALONE "request-vkbd-standalone" > #define XENKBD_FIELD_RING_GREF "page-gref" > #define XENKBD_FIELD_EVT_CHANNEL "event-channel" > #define XENKBD_FIELD_WIDTH "width" Thank you, Oleksandr --_000_dc9e3885a4d34fc082a6f9d34aff56c1AMSPEX02CL02citritenet_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

Hi Oleksandr,

 

The reason I=92m proposing the additional feature = flag is to differentiate between

older, broken, backends that will not connect with= out the vfb device

(qemu-upstream=92s implementation in hw/display/xe= nfb.c) and fixed backends

(like patches I=92ve posted to fix the qemu backen= d). Without a differentiator,

a frontend I=92ve developed will get stuck waiting= for the backend to connect,

and under Windows this effectively hangs the syste= m.

The Qemu backend should be fixed to make the vkbd = and vfb independent

devices. This proposal will help detect an incompa= tible backend and avoid a

VM hang.

 

(frontend WIP: http://xenbits.xen.org/gitweb/?p=3D= pvdrivers/win/xenvkbd.git;a=3Dtree)

Owen

 

From: Oleksandr Andrushchenko
Sent: 12 June 2017 08:07
To: Owen Smith; xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH] kbdif.h: Introduce feature-vkbd-sta= ndalone

 

Hi, Owen!

On 06/08/2017 04:09 PM, Owen Smith wrote:
> Backends set "feature-vkbd-standalone" to 1 if they can conn= ect
> without waiting for the PV framebuffer. If this value is missing
> or not 1, then a backend will wait for the PV framebuffer before
> connecting, potentially causing the frontend to wait indefinitely.
This means that by the new option we *fix an existing
backend* and its particular behavior. What is more,
we introduce knowledge of virtual fb into generic virtual
kbd/ptr protocol which seems to be not correct (IMO).
For the reasons above, I would recommend fixing the
corresponding backend instead, for example by configuring
it appropriately wrt use-case you have.
> Frontends set "request-vkbd-standalone" to 1 to request that= the
> backend does not wait for the PV framebuffer. Frontends that
> require a standalone vkbd device should not attempt to connect
> unless the backend advertises "feature-vkbd-standalone", and=
> should set "request-vkbd-standalone".
Again, this looks very use-case specific
> Backends that are standalone (i.e. do not have an associated PV
> framebuffer) do not rescale absolute mouse or touch coordinates
> to a the size of the (non-existant) PV framebuffer, and use the
> range of [0, 0x7fff] for absolute values.
>
> Signed-off-by: Owen Smith <owen.smith@citrix.com>
> ---
>   xen/include/public/io/kbdif.h | 15 ++++= 3;++++++++++
>   1 file changed, 15 insertions(+)
>
> diff --git a/xen/include/public/io/kbdif.h b/xen/include/public/io/kbd= if.h
> index dcbd71a..ca09080 100644
> --- a/xen/include/public/io/kbdif.h
> +++ b/xen/include/public/io/kbdif.h
> @@ -63,6 +63,12 @@
>    *      Backends, which supp= ort reporting of multi-touch events
>    *      should set this to 1= .
>    *
> + * feature-vkbd-standalone
> + *      Values:    &= nbsp;    <uint>
> + *
> + *      Backends, which support a standa= lone vkbd, without requiring a vfb
> + *      device, should set this to 1. > + *
>    *------------------------- Pointer Device Parameters= ------------------------
>    *
>    * width
> @@ -98,6 +104,13 @@
>    *
>    *      Request backend to r= eport multi-touch events.
>    *
> + * request-vkbd-standalone
> + *      Values:    &= nbsp;    <uint>
> + *
> + *      Request backend to connect vkbd = device without waiting for the
> + *      vfb device. Any absolute coordin= ates will NOT be scaled to
> + *      screen size, and will remain in = the range [0, 0x7fff]
> + *
>    *----------------------- Request Transport Parameter= s -----------------------
>    *
>    * event-channel
> @@ -165,8 +178,10 @@
>  
>   #define XENKBD_FIELD_FEAT_ABS_POINTER  "feature-= abs-pointer"
>   #define XENKBD_FIELD_FEAT_MTOUCH    &n= bsp;  "feature-multi-touch"
> +#define XENKBD_FIELD_FEAT_STANDALONE   "feature-vk= bd-standalone"
>   #define XENKBD_FIELD_REQ_ABS_POINTER   "req= uest-abs-pointer"
>   #define XENKBD_FIELD_REQ_MTOUCH    &nb= sp;   "request-multi-touch"
> +#define XENKBD_FIELD_REQ_STANDALONE    "reque= st-vkbd-standalone"
>   #define XENKBD_FIELD_RING_GREF    &nbs= p;    "page-gref"
>   #define XENKBD_FIELD_EVT_CHANNEL    &n= bsp;  "event-channel"
>   #define XENKBD_FIELD_WIDTH     &n= bsp;       "width"
Thank you,
Oleksandr
--_000_dc9e3885a4d34fc082a6f9d34aff56c1AMSPEX02CL02citritenet_-- --===============7644670922546605104== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============7644670922546605104==--