qemu-devel
[Top][All Lists]
Advanced

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

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


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v2] Release usb devices on shutdown and usb_del command
Date: Fri, 21 May 2010 08:51:07 +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

  Hi,

What about the existing callbacks?  Could handle_destroy do?

For hot-unplug it should do.

--- a/vl.c
+++ b/vl.c
@@ -3914,6 +3914,7 @@ int main(int argc, char **argv, char **envp)
      main_loop();
      quit_timers();
      net_cleanup();
+    usb_cleanup();

      return 0;
  }

Figure we'd have to clean up the qdev tree on exit.  Gerd?

Hmm, yes. Question is how to do that best. There is qdev_free(). Today this is used for hot-unplug only. Using it on exit() too could have unwanted guest-visible side effects as it doesn't just release ressources, but also unplugs the device if possible.

Maybe it is better to add a exit notifier ...

cheers,
  Gerd



reply via email to

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