qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] Release usb devices on shutdown and usb_del com


From: Gerd Hoffmann
Subject: [Qemu-devel] Re: [PATCH] Release usb devices on shutdown and usb_del command
Date: Tue, 25 May 2010 10:58:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4

On 05/21/10 19:55, Shahar Havivi wrote:
Remove usb_host_device_release and using usb_host_close to handle usb_del 
command.
Gerd, What do you think about the usb_cleanup()?

We need a mechanism to handle this for sure. I don't like that usb-specific approach very much though.

I think we should either do that at qdev level, then at exit walk the whole device tree and call cleanup functions (if present). So every device has the chance to do cleanups when needed.

Or we could have a exit notifier, which can be used for device (and also other) cleanup work.

I tend to think that a exit notifier will be better. We probably have only a few devices which actually have to do some cleanup work (usb passthrough, maybe pci passthrough too), so building qdev infrastructure for that feels a bit like overkill. And exit notifiers are more generic, i.e. it will also work for non-device stuff.

cheers,
  Gerd




reply via email to

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