From patchwork Wed May 2 07:16:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Andrushchenko X-Patchwork-Id: 10375091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D09CC60234 for ; Wed, 2 May 2018 07:16:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA25B28CE3 for ; Wed, 2 May 2018 07:16:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE86828CE8; Wed, 2 May 2018 07:16:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0738928CE3 for ; Wed, 2 May 2018 07:16:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750978AbeEBHQS (ORCPT ); Wed, 2 May 2018 03:16:18 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:33718 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbeEBHQR (ORCPT ); Wed, 2 May 2018 03:16:17 -0400 Received: by mail-lf0-f66.google.com with SMTP id m18-v6so19358463lfb.0 for ; Wed, 02 May 2018 00:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=O4DNVWk2SUXVGOYj2sr0coPkjk5pfNqdyw81HX6cCJ8=; b=Od9ac5sZL7snRHxh04e2q2zm/ed9enBNrJLa5vWK2i1OfGGyAYzaCIw6qo/35zpUWe VW4/zgSZmvRD2vnA+LN2jsNnkoikGz7RC70oGh0UxJwMe9FZCNYjWD+S2CQBz0mYRzom kcum1SeU3qzB2G2m9efR9S68IQu+ZRZTmZhd4dSUkH6YuVFiAfjwtiIef14qreEfL9uG 3whQMhmVoArczb0Z3SoWtawvkD52nUeibWDBZ0/ZMci3uUyOISWuXu5f7BrughGgfa9J 9SKbOFspVa98V/3/bEw2X8YqHPLoMODPVOXU2tBTJO7m27xvK3wpMCWgBptgqDzXs2+p i7qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O4DNVWk2SUXVGOYj2sr0coPkjk5pfNqdyw81HX6cCJ8=; b=P8Bxn4X4aGQ+AeVR+zZXhZ8jMqP1nbssYtnYSWy/trEx12EbrEs1QA4iCo7tLGUUqN W5MCveasSYYhJRvwV5sfoi5Ikw57InvSgrycu8U1c78+tpHdRb2BGFePQ7p/PEEokBnW Z73oRKxROvASQh3JCxjnS+zhlfgKOYq/NQe/J7r1FuQ1zx4//0WIEd6lTZcOc28g3HxC AJYYSjtEpzuTA/Nb0DdCIxuZC4xNS6rmrenS7ucWIFDLf0Yb1/VtcOMWAB1UWvHfmIuL vt9ZzzpYsO3Uz2xn7KT4xl9uDden2Fjjdxu+yjUo2RjyHVb5fF/4xtR52yoPLOuCqZ/S qt5Q== X-Gm-Message-State: ALQs6tAqKOZu6FvW7o/plsraxMRETwR7fBjfdKeOE/XaNoKNygjmxC2A Xw/JSonQJ6+N90NwSj55nphwzg== X-Google-Smtp-Source: AB8JxZqnOTZmFRaax3D7mOp5CDaysbGGz5sJqnlZCKquqcFT9HM0vbk22ANLIZJ/k5FLxzb9ZGJKRw== X-Received: by 2002:a19:180a:: with SMTP id o10-v6mr10831661lfi.117.1525245375791; Wed, 02 May 2018 00:16:15 -0700 (PDT) Received: from a2k-HP-ProDesk-600-G2-SFF.kyiv.epam.com (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id p20-v6sm2247421ljj.23.2018.05.02.00.16.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 May 2018 00:16:15 -0700 (PDT) From: Oleksandr Andrushchenko To: linux-input@vger.kernel.org, xen-devel@lists.xenproject.org, konrad.wilk@oracle.com, dmitry.torokhov@gmail.com Cc: jandryuk@gmail.com, andr2000@gmail.com, Oleksandr Andrushchenko Subject: [Xen-devel][PATCH v3] xen/kbdif: Add features to disable keyboard and pointer Date: Wed, 2 May 2018 10:16:08 +0300 Message-Id: <20180502071608.26864-1-andr2000@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Oleksandr Andrushchenko 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 Reviewed-by: Konrad Rzeszutek Wilk --- 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: + * + * 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: + * + * 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: * @@ -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"