This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-3.2-testing] qemu: Send unit_attention on cd-rom no

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] qemu: Send unit_attention on cd-rom not_ready to ready transition
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 May 2008 07:30:28 -0700
Delivery-date: Thu, 15 May 2008 07:30:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1210841199 -3600
# Node ID faffec221bada407c1b8543f2edbc359f5c9e659
# Parent  7bfd5bead11adcaf548f56e47bf8a41c1a3a4c9a
qemu: Send unit_attention on cd-rom not_ready to ready transition

Patch sends a UNIT_ATTENTION(6), MEDIUM_MAY_HAVE_CHANGED(0x28) sense
when cdrom transitions from not ready to ready.

ATA Packet interface for CD-ROMS, SFF8020i.pdf. See state diagram
Figure 12, page 82 and Table 44 -recommended Sense Key, ASC

With patch in place HVM win2008 server guest sees the CD/DVD contents
have changed when the media is switched.

Signed-off-by: Pat Campbell <plc@xxxxxxxxxx>
xen-unstable changeset:   17633:a864c0c4d605efceac28106a7072aa8c1ebdea83
xen-unstable date:        Wed May 14 09:15:02 2008 +0100
 tools/ioemu/hw/ide.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r 7bfd5bead11a -r faffec221bad tools/ioemu/hw/ide.c
--- a/tools/ioemu/hw/ide.c      Thu May 15 09:46:16 2008 +0100
+++ b/tools/ioemu/hw/ide.c      Thu May 15 09:46:39 2008 +0100
@@ -279,6 +279,7 @@
 #define ASC_ILLEGAL_OPCODE                   0x20
 #define ASC_LOGICAL_BLOCK_OOR                0x21
 #define ASC_INV_FIELD_IN_CMD_PACKET          0x24
+#define ASC_MEDIUM_MAY_HAVE_CHANGED          0x28
 #define ASC_MEDIUM_NOT_PRESENT               0x3a
@@ -1406,6 +1407,11 @@ static void ide_atapi_cmd(IDEState *s)
     switch(s->io_buffer[0]) {
         if (bdrv_is_inserted(s->bs)) {
+            if (s->is_cdrom && s->sense_key == SENSE_NOT_READY) {
+                ide_atapi_cmd_error(s, SENSE_UNIT_ATTENTION, 
+                                    ASC_MEDIUM_MAY_HAVE_CHANGED);
+                break;
+            }
         } else {
             ide_atapi_cmd_error(s, SENSE_NOT_READY, 

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] qemu: Send unit_attention on cd-rom not_ready to ready transition, Xen patchbot-3.2-testing <=