From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KU3yz-0006lA-J8 for qemu-devel@nongnu.org; Fri, 15 Aug 2008 14:25:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KU3yx-0006kU-0H for qemu-devel@nongnu.org; Fri, 15 Aug 2008 14:25:05 -0400 Received: from [199.232.76.173] (port=48088 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KU3yw-0006kR-Q5 for qemu-devel@nongnu.org; Fri, 15 Aug 2008 14:25:02 -0400 Received: from hera.kernel.org ([140.211.167.34]:49512) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KU3yw-0005BS-9k for qemu-devel@nongnu.org; Fri, 15 Aug 2008 14:25:02 -0400 Message-ID: <48A5C9F2.5080400@kernel.org> Date: Fri, 15 Aug 2008 11:24:50 -0700 From: Max Krasnyansky MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 2/5] husb: support for USB host device auto connect. References: <48A46033.3070200@codemonkey.ws> <48A489D3.5070900@kernel.org> <48A493DE.40506@codemonkey.ws> <48A496E9.2030800@kernel.org> <48A49878.1010502@codemonkey.ws> <20080815074638.GA31016@bogon.ms20.nix> In-Reply-To: <20080815074638.GA31016@bogon.ms20.nix> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Guido_G=FCnther?= Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Guido G=FCnther wrote: > On Thu, Aug 14, 2008 at 03:41:28PM -0500, Anthony Liguori wrote: >> Max Krasnyansky wrote: >>>>> Do you mind if we do something like that incrementally ? >>>>> =20 >>>> Yeah, I don't really want to have QEMU depend on dbus so in this cas= e, >>>> polling would be better. >>>> =20 >>> I'm thinking that maybe we could use 'inotify' on /proc/bus/usb. >>> Would you be ok with 'inotify' ? >>> =20 >> Yeah, but I would be a little surprised if /proc/bus/usb supports inot= ify... > What about /dev/bus/usb - it supports inotify fine on udev? Yes it should since it's a regular filesystem. Now inotify based solution probably won't be pretty because we'd have to monitor each subdir. ie When new device get added top level /dev/bus/usb = is not modified, what does get modified is /dev/bus/usb// directory= so we'd have to monitor /dev/bus/usb and dynamically register/unregister mon= itors for each /dev/bus/usb//. Maybe it won't be that bad. If I get a chance I'll give it a shot. btw Interface to HAL might still be useful in general to monitor other de= vice classes that we may want to automatically assign to the VMs. So I'll play around with that too (some day :)). Max