qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Shahar Havivi <shaharh@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	"David S. Ahern" <daahern@cisco.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Release usb devices on shutdown and usb_del command
Date: Tue, 25 May 2010 10:58:50 +0200	[thread overview]
Message-ID: <4BFB914A.3050903@redhat.com> (raw)
In-Reply-To: <20100521175520.GA25276@redhat.com>

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	other threads:[~2010-05-25  8:58 UTC|newest]

Thread overview: 7+ 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
2010-05-21 17:55       ` [Qemu-devel] Re: [PATCH] " Shahar Havivi
2010-05-25  8:58         ` Gerd Hoffmann [this message]
2010-05-26  8:48           ` Shahar Havivi

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=4BFB914A.3050903@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).