qemu/hw/ide
Alexander Graf 8464b273d6 ahci: fix win7 hang on boot
When AHCI executes an asynchronous IDE command, it checked DRDY without
checking either DRQ or BSY.  This sometimes caused interrupt to be sent
before command is actually completed.

This resulted in a race condition: if guest then managed to access the
device before command has completed, it would hang waiting for an
interrupt.
This was observed with windows 7 guests.

To fix, check for DRQ or BSY in additiona to DRDY, if set,
the command is asynchronous so delay the interrupt until
asynchronous done callback is invoked.

Reported-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-29 13:06:39 +01:00
..
ahci.c ahci: fix win7 hang on boot 2013-10-29 13:06:39 +01:00
ahci.h ide/ich: QOM parent field cleanup 2013-07-23 00:37:33 +02:00
atapi.c hw: move headers to include/ 2013-04-08 18:13:10 +02:00
cmd646.c ide: Pass size to ide_bus_new() 2013-08-30 20:14:39 +02:00
core.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
ich.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
internal.h ide: Pass size to ide_bus_new() 2013-08-30 20:14:39 +02:00
isa.c ide: Pass size to ide_bus_new() 2013-08-30 20:14:39 +02:00
macio.c ide: Pass size to ide_bus_new() 2013-08-30 20:14:39 +02:00
Makefile.objs hw: make all of hw/ide/ configurable via default-configs/ 2013-04-08 18:13:12 +02:00
microdrive.c hw: move headers to include/ 2013-04-08 18:13:10 +02:00
mmio.c ide: Pass size to ide_bus_new() 2013-08-30 20:14:39 +02:00
pci.c ide: Introduce abstract QOM type for PCIIDEState 2013-07-29 20:41:49 +02:00
pci.h ide: Introduce abstract QOM type for PCIIDEState 2013-07-29 20:41:49 +02:00
piix.c ide: Pass size to ide_bus_new() 2013-08-30 20:14:39 +02:00
qdev.c qdev: Pass size to qbus_create_inplace() 2013-08-30 21:15:35 +02:00
via.c ide: Pass size to ide_bus_new() 2013-08-30 20:14:39 +02:00