Received: by 10.192.165.156 with SMTP id m28csp609818imm; Thu, 19 Apr 2018 04:45:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx49GZxvT26gU3fTIoJB+wiRU+UuSir0TIVZnp86lNb9/4WJS57njAkTywgCsTMg+jO+FRSMn X-Received: by 10.99.182.66 with SMTP id v2mr3182890pgt.158.1524138352482; Thu, 19 Apr 2018 04:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524138352; cv=none; d=google.com; s=arc-20160816; b=dYyVZd0zKvA7QqVKDpHcmLKb3tSn9r6qrOdMYIvblJxExXHrn3tE83bamqUsnKRcEY VS3Yuf2ksfVQUxN3UO6z8JEZOoTMjt75fIMJSbhhnGSlZDExoh8uuSUUM1QIwKwuDgvw D3+ZyjdfjBBNGh7MmMLPgBNYkLagbwZs+2YhEIuIBk1ulFvAJZhL+6hV79pSy7WacCMK 14nq49cuduVjPSr82Zr9QcPOnX4zrN1NQiQhi+rxUk1pwriWgynKjcHFd6fJwRqLzVrB 1NJZ/krVMo6443UJ/tn8WBTkF83cyAmHt6DdZSO32lB0YCYEZn9wMcvNcUgnqB8W8MSM f6Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=gepHUIcgASFVHeLH/aS64kXqtnh0l2fpx8EQfuAGWEs=; b=ILUx7ZEnqKy1DLf8MLbRVXi90TBCHq4+/trICYLlBnDGD3r4kX86oJuE9EiDNGfZPY fg4BYnA97NLLR5QbFpQVwt5Jc+rDfXyWNMcWCMmNXkIRZFEhS7kSwlhSVZeGnR28h+Dm WffMRCsHh55sElPdBelCAQdSEwr2vuRt4VnYDZp77XYqHZEwMAP133GafMzA/6EVPkp8 dCbsh7xIVKL7NnwLMJh93Yle9zr0mjtdpsS6MQkaiXRuJ3TbsfZf43byGmCQde7UiceJ 3BywTBJ9r50/r5Msu9tzs8q7/sKxD6DIb7nJp5yDSrslR+DPK0AgpWbLAHK3kalBBCfw /fKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZGr2Apr4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si3373601pls.491.2018.04.19.04.45.38; Thu, 19 Apr 2018 04:45:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZGr2Apr4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbeDSLoZ (ORCPT + 99 others); Thu, 19 Apr 2018 07:44:25 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:38794 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbeDSLoX (ORCPT ); Thu, 19 Apr 2018 07:44:23 -0400 Received: by mail-lf0-f65.google.com with SMTP id z130-v6so354307lff.5; Thu, 19 Apr 2018 04:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=gepHUIcgASFVHeLH/aS64kXqtnh0l2fpx8EQfuAGWEs=; b=ZGr2Apr4HvrrJERBqBBoEPn/4HcHecHaClL/oPbHNJTNDliJa+madDYmygGrfG3+b7 iSF/c4rqY6tE4U7/d249Nj7lKk8rsHGydGPXuNmihkF173QtMGmYDqtbKjwv35COyXIt uLfWjPDCKUVPjoxOpshMjOTH1ZKiWf/RgblHFeSl3QyAJOLYkFiyIOWgsj/rEVyG1vTB fqGkcYgFlOvdn0eYH3Iva9M0EuOICdCTlDXHW+55qd2H5EdynELi7BXY837u4dcunnRM bdIERvlkojyTa7/1lfWpVddL79hPA7pXR06G8VbLgilKLFM7YwQB+uH0wZBBlLXxWNXr TeeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=gepHUIcgASFVHeLH/aS64kXqtnh0l2fpx8EQfuAGWEs=; b=JdxbEpVe+GiR4AdiV8EaEbIpi5O8iSKq+zgBPv/WNRziH2yBKBNzeflMf5MEMAJten 9vpKYHBGQ4P2Y+MyymDni7iaQZR6B1AB6ncIABAyT943fVwrtGj7LF8CCELLkFzX4Ctp DJV1spY6Mk4pWpPZpIfUoukKJiP3KxVj/iJzlEsrliXIX0pjaFw60/CHbGgX5ven5SPy HHaxv14ty5KnPhL6KNfZlPbJo63No/oAZod2ISZPFqNLSlRhHZp+WT6DD8VexsowARcI IMwxgpjCqkklkcjvkVPj/JWIqwqZPpaxhe8W/3kDd5H7UU/rG0oCTK5mfHVR+NmTFBQe I+eg== X-Gm-Message-State: ALQs6tCCnTHPCMZo//KrP0bVWXclxlGT0iBcHykNrCfUYQ9u6GQGxlHj /zCRiQcnZH8kvw5uXINfqCQ= X-Received: by 2002:a19:aacd:: with SMTP id t196-v6mr156359lfe.60.1524138261980; Thu, 19 Apr 2018 04:44:21 -0700 (PDT) Received: from [10.17.182.9] (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id t8-v6sm716489lfk.9.2018.04.19.04.44.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 04:44:20 -0700 (PDT) Subject: Re: [PATCH] Input: xen-kbdfront - allow better run-time configuration To: Juergen Gross , xen-devel@lists.xenproject.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, lyan@suse.com, boris.ostrovsky@oracle.com Cc: andrii_chepurnyi@epam.com, Oleksandr Andrushchenko References: <20180418150445.9805-1-andr2000@gmail.com> From: Oleksandr Andrushchenko Message-ID: <2bff035e-303e-d644-5f51-5e64150c097c@gmail.com> Date: Thu, 19 Apr 2018 14:44:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/19/2018 02:25 PM, Juergen Gross wrote: > On 18/04/18 17:04, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> It is now only possible to control if multi-touch virtual device >> is created or not (via the corresponding XenStore entries), >> but keyboard and pointer devices are always created. > Why don't you want to go that route for keyboard and mouse, too? > Or does this really make no sense? Well, I would prefer not to touch anything outside Linux and this driver. And these settings seem to be implementation specific. So, this is why introduce Linux module parameters and don't extend the kbdif protocol. >> In some cases this is not desirable. For example, if virtual >> keyboard device is exposed to Android then the latter won't >> automatically show on-screen keyboard as it expects that a >> physical keyboard device can be used for typing. >> >> Make it possible to configure which virtual devices are created >> with module parameters: >> - no_ptr_dev=1 if no pointer device needs to be created >> - no_kbd_dev=1 if no keyboard device needs to be created >> Keep old behavior by default. >> >> Signed-off-by: Oleksandr Andrushchenko >> Suggested-by: Andrii Chepurnyi >> Tested-by: Andrii Chepurnyi >> --- >> drivers/input/misc/xen-kbdfront.c | 159 +++++++++++++++++------------- >> 1 file changed, 92 insertions(+), 67 deletions(-) >> >> diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c >> index d91f3b1c5375..a3306aad40b0 100644 >> --- a/drivers/input/misc/xen-kbdfront.c >> +++ b/drivers/input/misc/xen-kbdfront.c >> @@ -51,6 +51,16 @@ module_param_array(ptr_size, int, NULL, 0444); >> MODULE_PARM_DESC(ptr_size, >> "Pointing device width, height in pixels (default 800,600)"); >> >> +static unsigned int no_ptr_dev; >> +module_param(no_ptr_dev, uint, 0); > Use type invbool instead? Hm, better bool then? invbool will require parameter name change to something like "with_ptr_dev" which might confuse, e.g. default was to go with pointer device, now we have with_ptr_dev module parameter: do I now need to set it to preserve the old behavior? The answer is no (because of invbool), but you have to dig for it. Will bool work for you? >> +MODULE_PARM_DESC(no_ptr_dev, >> + "If set then no virtual pointing device exposed to the guest"); >> + >> +static unsigned int no_kbd_dev; >> +module_param(no_kbd_dev, uint, 0); > invbool? > > > Juergen