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.1-testing] hvm, ioemu: Fix the ide/cdrom emulatio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] hvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest.
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:11:53 -0800
Delivery-date: Wed, 23 Jan 2008 01:18:56 -0800
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 1201001238 0
# Node ID b6f889cd8a6aca685a148d2bfdd85a8c992e6a05
# Parent  b33ea25c4e36c8bd8fe79cc33867b35521a82e85
hvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest.

The new libata-eh in the Linux kernel is throwing a fit over the QEMU
cdrom device for two reasons:

1) DRQ can be set with ERR_STAT set.  This is a violation of the ATAPI
state machine.

2) After a TEST_UNIT_READY ATAPI command is sent ERR_STAT is getting
which is correct.  But, when the OS issues another ATAPI command
ERR_STAT is still set.  Which is bad since the next expected command
from the OS is REQUEST_SENSE to find out why ERR_STAT is set.

bug this fixes: https://bugzilla.novell.com/show_bug.cgi?id=3D291775

Signed-off-by: Brandon Philips <bphilips@xxxxxxx>

Porting this qemu fix to xen.

Signed-off-by: Xu Dongxiao <dongxiao.xu@xxxxxxxxx>
xen-unstable changeset:   16776:2af5fb3e34e54e96d0c58e0e4557ee1240df9ce8
xen-unstable date:        Tue Jan 22 09:50:06 2008 +0000
 tools/ioemu/hw/ide.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r b33ea25c4e36 -r b6f889cd8a6a tools/ioemu/hw/ide.c
--- a/tools/ioemu/hw/ide.c      Tue Jan 22 11:26:45 2008 +0000
+++ b/tools/ioemu/hw/ide.c      Tue Jan 22 11:27:18 2008 +0000
@@ -774,7 +774,9 @@ static void ide_transfer_start(IDEState 
     s->end_transfer_func = end_transfer_func;
     s->data_ptr = buf;
     s->data_end = buf + size;
-    s->status |= DRQ_STAT;
+    /* don't violate the HSM */
+    if (!(s->status & ERR_STAT))
+        s->status |= DRQ_STAT;
@@ -1950,6 +1952,7 @@ static void ide_ioport_write(void *opaqu
             /* overlapping commands not supported */
             if (s->feature & 0x02)
                 goto abort_cmd;
+            s->status = READY_STAT;
             s->atapi_dma = s->feature & 1;
             s->nsector = 1;
             ide_transfer_start(s, s->io_buffer, ATAPI_PACKET_SIZE, 

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] hvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest., Xen patchbot-3.1-testing <=