qemu-e2k/hw/ide
John Snow 5694c7eacc ahci: fix PxCI register race
Fixes: https://bugs.launchpad.net/qemu/+bug/1769189

AHCI presently signals completion prior to the PxCI register being
cleared to indicate completion. If a guest driver attempts to issue
a new command in its IRQ handler, it might be surprised to learn there
is still a command pending.

In the case of Windows 10's boot driver, it will actually poll the IRQ
register hoping to find out when the command is done running -- which
will never happen, as there isn't a command running.

Fix this: clear PxCI in ahci_cmd_done and not in the asynchronous BH.
Because it now runs synchronously, we don't need to check if the command
is actually done by spying on the ATA registers. We know it's done.

CC: qemu-stable <qemu-stable@nongnu.org>
Reported-by: François Guerraz <kubrick@fgv6.net>
Tested-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Message-id: 20180531004323.4611-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2018-06-08 13:17:36 -04:00
..
ahci_internal.h hw/ide/ahci: Keep ALLWINNER_AHCI() macro internal 2018-05-20 08:37:53 +03:00
ahci-allwinner.c ide: use local path for local headers 2018-06-01 19:20:37 +03:00
ahci.c ahci: fix PxCI register race 2018-06-08 13:17:36 -04:00
atapi.c IDE: replace DEBUG_AIO with trace events 2017-09-18 15:01:26 -04:00
cmd646.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
core.c hw/ide: Remove unused include 2018-06-01 14:15:10 +02:00
ich.c ide: use local path for local headers 2018-06-01 19:20:37 +03:00
isa.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
macio.c macio: fix NULL pointer dereference when issuing IDE trim 2018-03-27 00:38:00 -04:00
Makefile.objs hw/ide: Emulate SiI3112 SATA controller 2018-01-10 12:53:00 +11:00
microdrive.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
mmio.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
pci.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
piix.c hw/ide: remove old i386 dependency 2017-12-18 17:07:02 +03:00
qdev.c hw/block: Use errp directly rather than local_err 2017-12-19 10:25:03 +00:00
sii3112.c sii3112: Remove unneeded exit function 2018-03-18 18:27:23 +11:00
trace-events misc, ide: remove use of HWADDR_PRIx in trace events 2018-05-20 08:25:23 +03:00
via.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00