From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751857AbbCTKgu (ORCPT ); Fri, 20 Mar 2015 06:36:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44914 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751385AbbCTKgs (ORCPT ); Fri, 20 Mar 2015 06:36:48 -0400 Message-ID: <1426847799.32097.66.camel@nilsson.home.kraxel.org> Subject: Re: [PATCH 1/1] Add virtio-input driver. From: Gerd Hoffmann To: David Herrmann Cc: virtio-dev@lists.oasis-open.org, virtualization@lists.linux-foundation.org, mst@redhat.com, Rusty Russell , open list , "open list:ABI/API" , Dmitry Torokhov Date: Fri, 20 Mar 2015 11:36:39 +0100 In-Reply-To: References: <1426756391-26585-1-git-send-email-kraxel@redhat.com> <1426756391-26585-2-git-send-email-kraxel@redhat.com> <1426844885.32097.36.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > There will also be pass-through support, i.e. qemu > > opening /dev/input/event and forwarding everything to the guest. > > How should that be handled best? Copy all four from the host? Even > > though the bustype is BUS_USB? Not sure this actually improves things > > because the guest can match the device, or whenever this confuses apps > > due to BUS_USB being applied to virtio devices ... > > Lemme give an example: We have databases in user-space, that allow > applications to figure out the mouse DPI values of a device. Those > databases match on all four, bus+vid+pid+ver (sometimes even more, > like name and dmi). If one of those is not forwarded, it will not be > detected. Ok, so forward as much as possible. > I'd like to see all four forwarded from the host. I'd be fine with > "bus" being set to VIRTUAL, but I'm not sure why that would be a good > thing to do? I think for the emulated devices it's fine to use VIRTUAL. For the passthrough case suspected we could confuse apps because ->phys points to a virtio device whereas ->type says "I'm usb". But at least the device database probably doesn't care much about the physical path I guess, because the mouse is the same no matter which usb port I plug it in, correct? cheers, Gerd