qemu-patch-raspberry4/hw
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
..
9pfs 9p: xattr: Properly translate xattrcreate flags 2018-06-07 12:17:22 +02:00
acpi acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
adc Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
alpha hw/alpha/dp264: Use the TYPE_SMC37C669_SUPERIO 2018-03-12 16:12:49 +01:00
arm stellaris: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
audio hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
block acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
bt hw/bt: Replace fprintf(stderr, "*\n" with error_report() 2018-01-22 09:51:00 +01:00
char hw/digic: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
core hw/core/register: Add trailing '\n' to qemu_log() call 2018-06-08 13:15:33 +01:00
cpu hw: use "qemu/osdep.h" as first #include in source files 2017-12-18 17:07:02 +03:00
cris hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
display xilinx-dp: Add trailing '\n' to qemu_log() call 2018-06-08 13:15:33 +01:00
dma xlnx-zdma: Correct mem leaks and memset to zero on desc unaligned errors 2018-05-31 14:50:52 +01:00
gpio hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
hppa acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
i2c hw/i2c: Add trace events 2018-06-08 13:15:33 +01:00
i386 migration/next for 20180604 2018-06-04 12:54:00 +01:00
ide ahci: fix PxCI register race 2018-06-08 13:17:36 -04:00
input hw: make virtio devices configurable via default-configs/ 2018-06-01 15:14:31 +02:00
intc arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR 2018-06-08 13:15:32 +01:00
ipack pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ipmi ipmi: Use proper struct reference for KCS vmstate 2018-06-01 15:13:46 +02:00
isa hw/isa/superio: Fix inconsistent use of Chardev->be 2018-06-01 15:13:46 +02:00
lm32 hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
m68k hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
mem nvdimm: fix typo in label-size definition 2018-05-23 17:02:03 +03:00
microblaze hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
mips hw/mips/boston: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
misc misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
moxie Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
net ftgmac100: remove check on runt messages 2018-06-08 13:15:32 +01:00
nios2 Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
nvram * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
openrisc Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
pci virtio,vhost,pci,pc: features, cleanups 2018-03-20 15:48:34 +00:00
pci-bridge virtio,vhost,pci,pc: features, fixes and cleanups 2018-02-13 16:33:31 +00:00
pci-host hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc ppc/pnv: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
rdma hw/rdma: Fix possible out of bounds access to port GID index 2018-05-03 20:52:29 +03:00
riscv hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
s390x * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
scsi acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
sd sdcard: Disable CMD19/CMD23 for Spec v2 2018-06-08 13:15:34 +01:00
sh4 hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
smbios Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
sparc Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
sparc64 serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS 2018-04-26 13:57:00 +01:00
ssi xilinx_spips: Correct SNOOP_NONE state when flushing the txfifo 2018-04-26 11:04:40 +01:00
timer hw/digic: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
tpm tpm: extend TPM TIS with state migration support 2018-05-24 12:07:04 -04:00
tricore hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
unicore32 hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
usb acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
vfio vfio/pci: Default display option to "off" 2018-06-05 08:28:09 -06:00
virtio acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
watchdog qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
xen * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
xenpv hw/xen*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:46 +01:00
xtensa hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
Makefile.objs hw: allow compiling out SCSI 2018-06-01 15:14:31 +02:00