qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] block: Correct size across CD-ROM media change
@ 2011-03-29 19:04 Stefan Hajnoczi
  2011-03-29 19:04 ` [Qemu-devel] [PATCH v2 1/3] trace: Trace bdrv_set_locked() Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 38+ messages in thread
From: Stefan Hajnoczi @ 2011-03-29 19:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Amit Shah, Anthony Liguori, Ryan Harper,
	Juan Quintela

This patch series fixes two Linux host CD-ROM pass-through bugs in QEMU.

After applying these patches it is possible to pass-through a Linux host CD-ROM
completely.  The guest can eject from software or the physical eject button can
be pressed on the drive.  The guest can detect this and newly inserted media
are noticed.  There is no need to issue any QEMU monitor 'eject' or 'change'
commands because the host CD-ROM is completely "passed through".

Patch details:

The first is that the device size is cached even for removable devices and we
never update it.  If a host CD-ROM is changed, then the size will be stale and
reflect that of the last medium.

The second is that Linux host CD-ROM pass-through requires that we re-open the
device to refresh its size.  This is because the Linux CD-ROM driver only
refreshes the size when the device is opened and furthermore has a bug that
leads to stale sizes if the file descriptor is held across media change.

I have also included a trace event for bdrv_set_locked() because it is useful
information when debugging issues like these in the future.

v2:
 * Clarify cdrom_is_inserted() comment as per Juan's suggestion

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2011-04-06  8:07 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 19:04 [Qemu-devel] [PATCH v2 0/3] block: Correct size across CD-ROM media change Stefan Hajnoczi
2011-03-29 19:04 ` [Qemu-devel] [PATCH v2 1/3] trace: Trace bdrv_set_locked() Stefan Hajnoczi
2011-03-29 19:04 ` [Qemu-devel] [PATCH v2 2/3] block: Do not cache device size for removable media Stefan Hajnoczi
2011-03-29 19:04 ` [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change Stefan Hajnoczi
2011-03-31 10:05   ` [Qemu-devel] " Kevin Wolf
2011-04-01 14:09     ` Stefan Hajnoczi
2011-04-03 11:57   ` [Qemu-devel] " Stefan Hajnoczi
2011-04-03 13:12     ` Blue Swirl
2011-04-03 18:06       ` Stefan Hajnoczi
2011-04-04 10:47         ` [libvirt] " Daniel P. Berrange
2011-04-04 12:58           ` Stefan Hajnoczi
2011-04-04 13:02           ` Anthony Liguori
2011-04-04 13:16             ` Daniel P. Berrange
2011-04-04 14:19               ` Anthony Liguori
2011-04-04 14:26                 ` Daniel P. Berrange
2011-04-04 14:43                   ` Anthony Liguori
2011-04-04 16:38                     ` Blue Swirl
2011-04-04 13:22     ` Avi Kivity
2011-04-04 13:38       ` Anthony Liguori
2011-04-04 13:49         ` Avi Kivity
2011-04-04 15:09           ` Stefan Hajnoczi
2011-04-04 15:11             ` Avi Kivity
2011-04-05  6:41             ` Amit Shah
2011-04-05  7:48               ` Avi Kivity
2011-04-05  8:09                 ` Amit Shah
2011-04-05  9:00                   ` Avi Kivity
2011-04-05  9:12                     ` Amit Shah
2011-04-05  9:17                       ` Avi Kivity
2011-04-05  9:26                         ` Amit Shah
2011-04-06  8:07                         ` Amit Shah
2011-04-05  8:40               ` Stefan Hajnoczi
2011-04-05  8:58                 ` Amit Shah
2011-04-04 17:54         ` David Ahern
2011-04-05  5:33           ` Stefan Hajnoczi
2011-04-05  5:42             ` David Ahern
2011-04-05 12:41               ` Stefan Hajnoczi
2011-03-30  8:33 ` [Qemu-devel] [PATCH v2 0/3] block: Correct size across CD-ROM " Markus Armbruster
2011-03-30 10:06   ` Stefan Hajnoczi

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).