All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] xen/kbdif: Add features to disable keyboard and pointer
@ 2018-05-02  7:16 Oleksandr Andrushchenko
  2018-05-02 13:58 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Oleksandr Andrushchenko @ 2018-05-02  7:16 UTC (permalink / raw)
  To: linux-input, xen-devel, konrad.wilk, dmitry.torokhov
  Cc: andr2000, Oleksandr Andrushchenko, jandryuk

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

It is now not fully possible to control if and which virtual devices
are created by the frontend, e.g. keyboard and pointer devices
are always created and multi-touch device is created if the
backend advertises multi-touch support. In some cases this
behavior is not desirable and better control over the frontend's
configuration is required.

Add new XenStore feature fields, so it is possible to individually
control set of exposed virtual devices for each guest OS:
 - set feature-disable-keyboard to 1 if no keyboard device needs
   to be created
 - set feature-disable-pointer to 1 if no pointer device needs
   to be created

Keep old behavior by default.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
 xen/include/public/io/kbdif.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/xen/include/public/io/kbdif.h b/xen/include/public/io/kbdif.h
index 3ce54e9a44c1..9a0648bdced9 100644
--- a/xen/include/public/io/kbdif.h
+++ b/xen/include/public/io/kbdif.h
@@ -51,6 +51,18 @@
  * corresponding entries in XenStore and puts 1 as the value of the entry.
  * If a feature is not supported then 0 must be set or feature entry omitted.
  *
+ * feature-disable-keyboard
+ *      Values:         <uint>
+ *
+ *      If there is no need to expose a virtual keyboard device by the
+ *      frontend then this must be set to 1.
+ *
+ * feature-disable-pointer
+ *      Values:         <uint>
+ *
+ *      If there is no need to expose a virtual pointer device by the
+ *      frontend then this must be set to 1.
+ *
  * feature-abs-pointer
  *      Values:         <uint>
  *
@@ -177,6 +189,8 @@
 
 #define XENKBD_DRIVER_NAME             "vkbd"
 
+#define XENKBD_FIELD_FEAT_DSBL_KEYBRD  "feature-disable-keyboard"
+#define XENKBD_FIELD_FEAT_DSBL_POINTER "feature-disable-pointer"
 #define XENKBD_FIELD_FEAT_ABS_POINTER  "feature-abs-pointer"
 #define XENKBD_FIELD_FEAT_MTOUCH       "feature-multi-touch"
 #define XENKBD_FIELD_REQ_ABS_POINTER   "request-abs-pointer"
-- 
2.17.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] xen/kbdif: Add features to disable keyboard and pointer
  2018-05-02  7:16 [PATCH v3] xen/kbdif: Add features to disable keyboard and pointer Oleksandr Andrushchenko
@ 2018-05-02 13:58 ` Konrad Rzeszutek Wilk
  2018-05-02 14:18   ` Oleksandr Andrushchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2018-05-02 13:58 UTC (permalink / raw)
  To: Oleksandr Andrushchenko
  Cc: xen-devel, dmitry.torokhov, jandryuk, Oleksandr Andrushchenko,
	linux-input

On Wed, May 02, 2018 at 10:16:08AM +0300, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> It is now not fully possible to control if and which virtual devices
> are created by the frontend, e.g. keyboard and pointer devices
> are always created and multi-touch device is created if the
> backend advertises multi-touch support. In some cases this
> behavior is not desirable and better control over the frontend's
> configuration is required.
> 
> Add new XenStore feature fields, so it is possible to individually
> control set of exposed virtual devices for each guest OS:
>  - set feature-disable-keyboard to 1 if no keyboard device needs
>    to be created
>  - set feature-disable-pointer to 1 if no pointer device needs
>    to be created
> 
> Keep old behavior by default.
> 
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Thank you!
> ---
>  xen/include/public/io/kbdif.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/xen/include/public/io/kbdif.h b/xen/include/public/io/kbdif.h
> index 3ce54e9a44c1..9a0648bdced9 100644
> --- a/xen/include/public/io/kbdif.h
> +++ b/xen/include/public/io/kbdif.h
> @@ -51,6 +51,18 @@
>   * corresponding entries in XenStore and puts 1 as the value of the entry.
>   * If a feature is not supported then 0 must be set or feature entry omitted.
>   *
> + * feature-disable-keyboard
> + *      Values:         <uint>
> + *
> + *      If there is no need to expose a virtual keyboard device by the
> + *      frontend then this must be set to 1.
> + *
> + * feature-disable-pointer
> + *      Values:         <uint>
> + *
> + *      If there is no need to expose a virtual pointer device by the
> + *      frontend then this must be set to 1.
> + *
>   * feature-abs-pointer
>   *      Values:         <uint>
>   *
> @@ -177,6 +189,8 @@
>  
>  #define XENKBD_DRIVER_NAME             "vkbd"
>  
> +#define XENKBD_FIELD_FEAT_DSBL_KEYBRD  "feature-disable-keyboard"
> +#define XENKBD_FIELD_FEAT_DSBL_POINTER "feature-disable-pointer"
>  #define XENKBD_FIELD_FEAT_ABS_POINTER  "feature-abs-pointer"
>  #define XENKBD_FIELD_FEAT_MTOUCH       "feature-multi-touch"
>  #define XENKBD_FIELD_REQ_ABS_POINTER   "request-abs-pointer"
> -- 
> 2.17.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] xen/kbdif: Add features to disable keyboard and pointer
  2018-05-02 13:58 ` Konrad Rzeszutek Wilk
@ 2018-05-02 14:18   ` Oleksandr Andrushchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Oleksandr Andrushchenko @ 2018-05-02 14:18 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: xen-devel, dmitry.torokhov, jandryuk, Oleksandr Andrushchenko,
	linux-input

On 05/02/2018 04:58 PM, Konrad Rzeszutek Wilk wrote:
> On Wed, May 02, 2018 at 10:16:08AM +0300, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> It is now not fully possible to control if and which virtual devices
>> are created by the frontend, e.g. keyboard and pointer devices
>> are always created and multi-touch device is created if the
>> backend advertises multi-touch support. In some cases this
>> behavior is not desirable and better control over the frontend's
>> configuration is required.
>>
>> Add new XenStore feature fields, so it is possible to individually
>> control set of exposed virtual devices for each guest OS:
>>   - set feature-disable-keyboard to 1 if no keyboard device needs
>>     to be created
>>   - set feature-disable-pointer to 1 if no pointer device needs
>>     to be created
>>
>> Keep old behavior by default.
>>
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> Thank you!
Thank you!

One thing - I tried to apply this change to Linux Kernel (to align the 
interface
files) and found that when we added {feature|request}-raw-pointer we didn't:
1. Add string constants for that
2. Changes were not synchronized with Linux

So, I'll probably re-send this patch with your r-b + fix for 1) and will 
send a cumulative
patch to synchronize Linux and Xen headers after that.

Konrad, what do you think?
>> ---
>>   xen/include/public/io/kbdif.h | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/xen/include/public/io/kbdif.h b/xen/include/public/io/kbdif.h
>> index 3ce54e9a44c1..9a0648bdced9 100644
>> --- a/xen/include/public/io/kbdif.h
>> +++ b/xen/include/public/io/kbdif.h
>> @@ -51,6 +51,18 @@
>>    * corresponding entries in XenStore and puts 1 as the value of the entry.
>>    * If a feature is not supported then 0 must be set or feature entry omitted.
>>    *
>> + * feature-disable-keyboard
>> + *      Values:         <uint>
>> + *
>> + *      If there is no need to expose a virtual keyboard device by the
>> + *      frontend then this must be set to 1.
>> + *
>> + * feature-disable-pointer
>> + *      Values:         <uint>
>> + *
>> + *      If there is no need to expose a virtual pointer device by the
>> + *      frontend then this must be set to 1.
>> + *
>>    * feature-abs-pointer
>>    *      Values:         <uint>
>>    *
>> @@ -177,6 +189,8 @@
>>   
>>   #define XENKBD_DRIVER_NAME             "vkbd"
>>   
>> +#define XENKBD_FIELD_FEAT_DSBL_KEYBRD  "feature-disable-keyboard"
>> +#define XENKBD_FIELD_FEAT_DSBL_POINTER "feature-disable-pointer"
>>   #define XENKBD_FIELD_FEAT_ABS_POINTER  "feature-abs-pointer"
>>   #define XENKBD_FIELD_FEAT_MTOUCH       "feature-multi-touch"
>>   #define XENKBD_FIELD_REQ_ABS_POINTER   "request-abs-pointer"
>> -- 
>> 2.17.0
>>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-02 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02  7:16 [PATCH v3] xen/kbdif: Add features to disable keyboard and pointer Oleksandr Andrushchenko
2018-05-02 13:58 ` Konrad Rzeszutek Wilk
2018-05-02 14:18   ` Oleksandr Andrushchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.