aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2015-06-04 22:59:35 +0100
committerJohn Snow <jsnow@redhat.com>2015-06-04 20:25:39 -0400
commitac58fe7b2c67a9be142beacd4c6ee51f3264d90f (patch)
treeb85869189c41fceb9f9e7410145613acf1585f05 /include/hw
parent0389b8f8c7688fe512e16bdc00c5f35d2d8df12c (diff)
downloadqemu-ac58fe7b2c67a9be142beacd4c6ee51f3264d90f.zip
qemu-ac58fe7b2c67a9be142beacd4c6ee51f3264d90f.tar.gz
qemu-ac58fe7b2c67a9be142beacd4c6ee51f3264d90f.tar.bz2
macio: switch pmac_dma_write() over to new offset/len implementation
In particular, this fixes a bug whereby chains of overlapping head/tail chains would incorrectly write over each other's remainder cache. This is the access pattern used by OS X/Darwin and fixes an issue with a corrupt Darwin installation in my local tests. While we are here, rename the DBDMA_io struct property remainder to head_remainder for clarification. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1433455177-21243-3-git-send-email-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/ppc/mac_dbdma.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h
index c580327..7f247fa 100644
--- a/include/hw/ppc/mac_dbdma.h
+++ b/include/hw/ppc/mac_dbdma.h
@@ -40,7 +40,8 @@ struct DBDMA_io {
/* DMA is in progress, don't start another one */
bool processing;
/* unaligned last sector of a request */
- uint8_t remainder[0x200];
+ uint8_t head_remainder[0x200];
+ uint8_t tail_remainder[0x200];
int remainder_len;
QEMUIOVector iov;
};