Thanks a lot! So we need to use "usb_del bus.addr" to remove the device from the guest. So I must get the bus.addr information for the device first. But I cannot do so by just add code into usb_device_add() function, because the bus.addr will change after that. Is there a place in QEMU source code suitable for logging the bus.addr information?
Thanks Xiaoyang -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lonnie Mendez Sent: 2006年12月7日 14:23 To: [email protected] Subject: RE: [Qemu-devel] Bus number and address changes after usb_add? 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. _______________________________________________ Qemu-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/qemu-devel
