From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Krasnyansky Subject: Re: [Qemu-devel] Re: [PATCH 2/5] husb: support for USB host device auto connect. Date: Fri, 15 Aug 2008 11:24:50 -0700 Message-ID: <48A5C9F2.5080400@kernel.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: =?ISO-8859-1?Q?Guido_G=FCnther?= Return-path: Received: from hera.kernel.org ([140.211.167.34]:41446 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756866AbYHOSZL (ORCPT ); Fri, 15 Aug 2008 14:25:11 -0400 In-Reply-To: <20080815074638.GA31016@bogon.ms20.nix> Sender: kvm-owner@vger.kernel.org List-ID: 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 c= ase, >>>> 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 in= otify... > 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 t= o monitor each subdir. ie When new device get added top level /dev/bus/us= b is not modified, what does get modified is /dev/bus/usb// directo= ry so we'd have to monitor /dev/bus/usb and dynamically register/unregister m= onitors 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 = device classes that we may want to automatically assign to the VMs. So I'll pl= ay around with that too (some day :)). Max