diff mbox

[Xen-devel,v4,2/2] xen/kbdif: Add features to disable keyboard and pointer

Message ID 20180502144919.16780-2-andr2000@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Oleksandr Andrushchenko May 2, 2018, 2:49 p.m. UTC
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>
---
 xen/include/public/io/kbdif.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Oleksandr Andrushchenko May 17, 2018, 5:45 a.m. UTC | #1
Hi, Juergen!

This patch should go into 4.11 as it is needed for a related Linux
kernel patch and the risk is next to zero for Xen due to only adding
some macros not in use on Xen side.

Could you please release ack this and apply?

Thank you,
Oleksandr

On 05/02/2018 05:49 PM, 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>
> ---
>   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 daf4bc2063c9..23d1f70d5210 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_RAW_POINTER  "feature-raw-pointer"
>   #define XENKBD_FIELD_FEAT_MTOUCH       "feature-multi-touch"

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jürgen Groß May 17, 2018, 5:50 a.m. UTC | #2
On 17/05/18 07:45, Oleksandr Andrushchenko wrote:
> Hi, Juergen!
> 
> This patch should go into 4.11 as it is needed for a related Linux
> kernel patch and the risk is next to zero for Xen due to only adding
> some macros not in use on Xen side.
> 
> Could you please release ack this

Release-acked-by: Juergen Gross <jgross@suse.com>

> and apply?

This has to be done by a committer, which I'm not.


Juergen
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Oleksandr Andrushchenko May 17, 2018, 5:51 a.m. UTC | #3
On 05/17/2018 08:50 AM, Juergen Gross wrote:
> On 17/05/18 07:45, Oleksandr Andrushchenko wrote:
>> Hi, Juergen!
>>
>> This patch should go into 4.11 as it is needed for a related Linux
>> kernel patch and the risk is next to zero for Xen due to only adding
>> some macros not in use on Xen side.
>>
>> Could you please release ack this
> Release-acked-by: Juergen Gross <jgross@suse.com>
Thank you
>> and apply?
> This has to be done by a committer, which I'm not.
Konrad, could you please apply?
>
> Juergen
Thank you,
Oleksandr
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Konrad Rzeszutek Wilk May 17, 2018, 2:09 p.m. UTC | #4
On Thu, May 17, 2018 at 08:51:38AM +0300, Oleksandr Andrushchenko wrote:
> On 05/17/2018 08:50 AM, Juergen Gross wrote:
> > On 17/05/18 07:45, Oleksandr Andrushchenko wrote:
> > > Hi, Juergen!
> > > 
> > > This patch should go into 4.11 as it is needed for a related Linux
> > > kernel patch and the risk is next to zero for Xen due to only adding
> > > some macros not in use on Xen side.
> > > 
> > > Could you please release ack this
> > Release-acked-by: Juergen Gross <jgross@suse.com>
> Thank you
> > > and apply?
> > This has to be done by a committer, which I'm not.
> Konrad, could you please apply?

Yes of course.
> > 
> > Juergen
> Thank you,
> Oleksandr
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Oleksandr Andrushchenko May 17, 2018, 6:41 p.m. UTC | #5
On 05/17/2018 05:09 PM, Konrad Rzeszutek Wilk wrote:
> On Thu, May 17, 2018 at 08:51:38AM +0300, Oleksandr Andrushchenko wrote:
>> On 05/17/2018 08:50 AM, Juergen Gross wrote:
>>> On 17/05/18 07:45, Oleksandr Andrushchenko wrote:
>>>> Hi, Juergen!
>>>>
>>>> This patch should go into 4.11 as it is needed for a related Linux
>>>> kernel patch and the risk is next to zero for Xen due to only adding
>>>> some macros not in use on Xen side.
>>>>
>>>> Could you please release ack this
>>> Release-acked-by: Juergen Gross <jgross@suse.com>
>> Thank you
>>>> and apply?
>>> This has to be done by a committer, which I'm not.
>> Konrad, could you please apply?
> Yes of course.
Thank you
>>> Juergen
>> Thank you,
>> Oleksandr

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/xen/include/public/io/kbdif.h b/xen/include/public/io/kbdif.h
index daf4bc2063c9..23d1f70d5210 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_RAW_POINTER  "feature-raw-pointer"
 #define XENKBD_FIELD_FEAT_MTOUCH       "feature-multi-touch"