qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Qemu-devel] Bus number and address changes after usb_add?


From: Yu, Xiaoyang
Subject: RE: [Qemu-devel] Bus number and address changes after usb_add?
Date: Thu, 7 Dec 2006 14:43:19 +0800

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: address@hidden [mailto:address@hidden On Behalf Of Lonnie Mendez
Sent: 2006年12月7日 14:23
To: address@hidden
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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]