From patchwork Wed May 2 14:49:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Andrushchenko X-Patchwork-Id: 10375813 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 3AAAC6038F for ; Wed, 2 May 2018 14:49:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 280D920182 for ; Wed, 2 May 2018 14:49:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C92327F81; Wed, 2 May 2018 14:49:34 +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 B85F320182 for ; Wed, 2 May 2018 14:49:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751652AbeEBOtb (ORCPT ); Wed, 2 May 2018 10:49:31 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:39540 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658AbeEBOt3 (ORCPT ); Wed, 2 May 2018 10:49:29 -0400 Received: by mail-lf0-f65.google.com with SMTP id j193-v6so21262566lfg.6 for ; Wed, 02 May 2018 07:49:28 -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:in-reply-to:references; bh=KHz8HVE77s/CDWX/ygX6E6c5qo5zKk0tX2cbSmKwQ1Y=; b=SoXuxo8ZrsMMntWEGbBaPvbjFNjz+U3TsUWq8+ksRqrTBaMpKxcZONJXxcIlB/uyb5 b9zy7w497EXzgo2t3SC2qPDJ8CpifMjEAmQu/m9UDGf4EeNFnFBH9X+eAnsfzb43XsHV k+yS08Ik2np1qN/RzNFsBPlwPLKrAqApsjKt3316XgBwt+D3A9iOMv5NTod8sggqlvQA zne/askubEi7Er0S/M9gNL3VI9p2d6zXvPqYrzwvTu1QNcdi2T+P+TVPoN0Tr1OdG1sV 8bPfXaBd1IBxiCtofXueKk1ngeB2qh/d17Vldyc32XdUs9EpPKFlDjoaI6XnLPF1RLke aFrw== 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:in-reply-to :references; bh=KHz8HVE77s/CDWX/ygX6E6c5qo5zKk0tX2cbSmKwQ1Y=; b=Vl4onAyRwS8x/Xf6ZpEMPrUTqbjKWV3TmNGc7/+nl9dt+7oZYRAOWr7I+fHZE9ukRD yY8EfdXBc0s59vpBsFzpkdL0RdKetRVRxseKEG0jMRNI62GxQKWmiguSO0P2vMTfgG2w sXjFVblVEJEjsklNxti1OjuU2471HOii6nDJl528Uy/vktPak0YWbNYJhwsk2FxKp2AB M1tbgLRZn6Lz0yX7u35mq6e1YuUM6R5NZi5GciL5m4w7TlxXx5fFfotnFqn6HA4Gxb54 Sf/QUzHXHm0rALEDhDTbua1/EG2QanmHnJ0jX6uZEwCyEMmw2NLRhTFRJDt/Ujmgv3LR aIAQ== X-Gm-Message-State: ALQs6tB/xRXSvtO4XG6eidRb3M8KVzSujRLiQcn7twEC1jZ4ayJFRWb9 e/eN5XX98vd2IbJJB4UkgZ9A3Q== X-Google-Smtp-Source: AB8JxZogMSZ2kcDBaBYOsNIMjgVvYt5ldJWkgetjNyLZ3xXckWKB+l+kAe6H1QooZLZj7ROl3ECX8w== X-Received: by 2002:a2e:3806:: with SMTP id f6-v6mr6228072lja.25.1525272567757; Wed, 02 May 2018 07:49:27 -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 h20-v6sm2397090ljj.85.2018.05.02.07.49.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 May 2018 07:49:26 -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 v4 2/2] xen/kbdif: Add features to disable keyboard and pointer Date: Wed, 2 May 2018 17:49:19 +0300 Message-Id: <20180502144919.16780-2-andr2000@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180502144919.16780-1-andr2000@gmail.com> References: <20180502144919.16780-1-andr2000@gmail.com> 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 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: + * + * 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_RAW_POINTER "feature-raw-pointer" #define XENKBD_FIELD_FEAT_MTOUCH "feature-multi-touch"