summaryrefslogtreecommitdiff
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-07-04 02:06:04 -0400
committerJohn Snow <jsnow@redhat.com>2015-07-04 02:06:04 -0400
commit7c03a691077e71a08bbca06568cd97f09537458c (patch)
tree6dbd01fcba9ccd91692cd9b575f39ede24cfad3c /hw/ide/core.c
parent54f3223730736fca1e6e89bb7f99c4f8432fdabb (diff)
downloadqemu-7c03a691077e71a08bbca06568cd97f09537458c.tar.gz
ahci: add rwerror=stop support for ncq
Handle NCQ failures for cases where we want to halt the VM on IO errors. Upon a VM state change, retry the halted NCQ commands. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1435767578-32743-7-git-send-email-jsnow@redhat.com
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index be7c350b87..122e955084 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2371,6 +2371,13 @@ static void ide_restart_bh(void *opaque)
* called function can set a new error status. */
bus->error_status = 0;
+ /* The HBA has generically asked to be kicked on retry */
+ if (error_status & IDE_RETRY_HBA) {
+ if (s->bus->dma->ops->restart) {
+ s->bus->dma->ops->restart(s->bus->dma);
+ }
+ }
+
if (error_status & IDE_RETRY_DMA) {
if (error_status & IDE_RETRY_TRIM) {
ide_restart_dma(s, IDE_DMA_TRIM);