qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	eblake@redhat.com, Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED
Date: Fri, 10 Feb 2012 18:55:22 +0100	[thread overview]
Message-ID: <4F355A0A.6050503@redhat.com> (raw)
In-Reply-To: <20120210150456.7de8af48@doriath.home>

Am 10.02.2012 18:04, schrieb Luiz Capitulino:
> This reminds me about an earlier try where I did the following, iirc:
> 
>  1. added commands blockdev-tray-open, blockdev-tray-close, blockdev-medium-insert,
>     blockdev-medium-remove
>  2. added the events: BLOCK_TRAY_OPEN, BLOCK_TRAY_CLOSE, BLOCK_MEDIUM_INSERTED
>     BLOCK_MEDIUM_REMOVED, which would be emitted when the relating command is issued
>     (maybe the events could just be BLOCK_TRAY_CHANGED & BLOCK_MEDIUM_CHANGED)
>  3. re-wrote eject and change in terms of the new commands, note that you get the
>     events for free
> 
> Now, maybe the guest eject could also emit BLOCK_TRAY_OPEN & BLOCK_TRAY_CLOSE. Then
> I think this is a complete solution.
> 
> Do you guys agree?

Looks good to me in general. I'm not sure how you're imagining to
implement this, I would prefer not to emit events from the device code,
but only from block.c.

Another interesting point is what to do with host CD-ROM passthrough. I
think the TRAY_OPEN/CLOSE part is doable (do Paolo's patches actually do
that, so that we just need to add an event?). We would have to fake
MEDIUM_REMOVED/INSERTED immediately before a TRAY_CLOSE if the medium
has changed. LOCK/UNLOCK (which you forgot in your list) is only
initiated by the guest or monitor (eject -f), so there's nothing special
with passthrough.

Kevin

  reply	other threads:[~2012-02-10 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 18:09 [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 1/5] block: Rename bdrv_mon_event() & BlockMonEventAction Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 2/5] block: bdrv_eject(): Make eject_flag a real bool Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 3/5] block: bdrv_eject(): Add tray_changed parameter Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 4/5] qmp: add the GUEST_MEDIUM_EJECTED event Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 5/5] qmp: add the BLOCK_MEDIUM_CHANGED event Luiz Capitulino
2012-02-09 15:01 ` [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED Markus Armbruster
2012-02-09 16:07   ` Luiz Capitulino
2012-02-10  9:27     ` Markus Armbruster
2012-02-10 17:20       ` Luiz Capitulino
2012-02-10  7:58   ` Paolo Bonzini
2012-02-10  9:36     ` Markus Armbruster
2012-02-10 17:04       ` Luiz Capitulino
2012-02-10 17:55         ` Kevin Wolf [this message]
2012-02-10 19:39           ` Paolo Bonzini
2012-02-10 20:47             ` Paolo Bonzini

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=4F355A0A.6050503@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).