qemu-patch-raspberry4/hw/ide
Andrea Arcangeli 953844d102 ide: Avoid canceling IDE DMA
The reason for not actually canceling the I/O is because with
virtualization and lots of VM running, a guest fs may mistake a
overload of the host, as an IDE timeout. So rather than canceling the
I/O, it's safer to wait I/O completion and simulate that the I/O has
completed just before the io cancellation was requested by the
guest. This way if ntfs or an app writes data without checking for
-EIO retval, and it thinks the write has succeeded, it's less likely
to run into troubles. Similar issues for reads.

Furthermore because the DMA operation is splitted into many synchronous
aio_read/write if there's more than one entry in the SG table, without this
patch the DMA would be cancelled in the middle, something we've no idea if it
happens on real hardware too or not. Overall this seems a great risk for zero
gain.

This approach is sure safer than previous code given we can't pretend all guest
fs code out there to check for errors and reply the DMA if it was completed
partially, given a timeout would never materialize on a real harddisk unless
there are defective blocks (and defective blocks are practically only an issue
for reads never for writes in any recent hardware as writing to blocks is the
way to fix them) or the harddisk breaks as a whole.

Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-08-03 15:57:22 +02:00
..
cmd646.c pci: don't overwrite multi functio bit in pci header type. 2010-07-11 20:00:56 +03:00
core.c Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevin 2010-07-30 21:12:24 +02:00
internal.h ide: fix migration in the middle of pio operation 2010-07-26 16:19:51 -05:00
isa.c savevm: Add DeviceState param 2010-07-06 10:36:28 -05:00
macio.c Merge remote branch 'kwolf/for-anthony' into staging 2010-07-06 10:48:01 -05:00
microdrive.c Merge remote branch 'kwolf/for-anthony' into staging 2010-07-06 10:48:01 -05:00
mmio.c savevm: Add DeviceState param 2010-07-06 10:36:28 -05:00
pci.c ide: Avoid canceling IDE DMA 2010-08-03 15:57:22 +02:00
pci.h ide: port pci ide to vmstate 2009-10-27 12:28:46 -05:00
piix.c pci: don't overwrite multi functio bit in pci header type. 2010-07-11 20:00:56 +03:00
qdev.c ide: Make ide_init_drive() return success 2010-07-06 17:05:49 +02:00
via.c pci/multi function bit: fix vt82c686.c. 2010-07-12 18:36:02 +02:00