From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsCeq-0006JH-C9 for qemu-devel@nongnu.org; Thu, 07 Dec 2006 01:23:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsCeo-0006Ik-L3 for qemu-devel@nongnu.org; Thu, 07 Dec 2006 01:22:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsCeo-0006Ih-HB for qemu-devel@nongnu.org; Thu, 07 Dec 2006 01:22:58 -0500 Received: from [24.93.47.43] (helo=ms-smtp-04.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsCeo-0000Wt-Db for qemu-devel@nongnu.org; Thu, 07 Dec 2006 01:22:58 -0500 Received: from vaio (cpe-66-68-31-100.austin.res.rr.com [66.68.31.100]) by ms-smtp-04.texas.rr.com (8.13.6/8.13.6) with ESMTP id kB76Mu0O006791 for ; Thu, 7 Dec 2006 00:22:56 -0600 (CST) Subject: RE: [Qemu-devel] Bus number and address changes after usb_add? From: Lonnie Mendez In-Reply-To: References: Content-Type: text/plain Date: Thu, 07 Dec 2006 00:22:45 -0600 Message-Id: <1165472565.19968.16.camel@vaio> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, 2006-12-07 at 14:11 +0800, Yu, Xiaoyang wrote: > I see. Guest OS will assign the USB device an address later. Is it possible to store this new address in host OS? Then when the USB device is unplugged, host OS can send "usb_del" command to QEMU to automatically delete the device. It's possible (on linux host) to register a signal with the kernel that will trigger when the device is disconnected from the host system. From the signal handler the device can then be removed from the guest. See USBDEVFS_DISCSIGNAL ioctl in usbdevice_fs.h.