All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Shahar Havivi <shaharh@redhat.com>,
	qemu-devel@nongnu.org, "David S. Ahern" <daahern@cisco.com>
Subject: Re: [Qemu-devel] [PATCH v2] Release usb devices on shutdown and usb_del command
Date: Fri, 21 May 2010 08:51:07 +0200	[thread overview]
Message-ID: <4BF62D5B.9050809@redhat.com> (raw)
In-Reply-To: <m3r5l5u5kl.fsf@blackfin.pond.sub.org>

   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	other threads:[~2010-05-21  6:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 18:10 [Qemu-devel] [PATCH v2] Release usb devices on shutdown and usb_del command Shahar Havivi
2010-05-19 18:43 ` David S. Ahern
2010-05-21  6:33   ` Markus Armbruster
2010-05-21  6:51     ` Gerd Hoffmann [this message]
2010-05-21 17:55       ` [Qemu-devel] Re: [PATCH] " Shahar Havivi
2010-05-25  8:58         ` Gerd Hoffmann
2010-05-26  8:48           ` Shahar Havivi
  -- strict thread matches above, loose matches on Subject: below --
2010-05-21 18:45 [Qemu-devel] [PATCH v2] " David S. Ahern
2010-05-21 19:40 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF62D5B.9050809@redhat.com \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=daahern@cisco.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shaharh@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.