summaryrefslogtreecommitdiff
path: root/hw/ide/internal.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-10-18 17:13:05 +0200
committerKevin Wolf <kwolf@redhat.com>2010-10-22 14:49:35 +0200
commite2bcadadc35673223c1445152445d0c9b6887b9e (patch)
tree3fcc3dd3ada74393b30c57fa7bd236fb22dd1a20 /hw/ide/internal.h
parent6bcb1a79a31563f2c414e1bd35d044d6ab385011 (diff)
downloadqemu-e2bcadadc35673223c1445152445d0c9b6887b9e.tar.gz
ide: Handle flush failure
Instead of always assuming success for bdrv_aio_flush, actually do something with the error. This respects the werror option and accordingly ignores the error, reports it to the guest or stops the VM and retries after cont. Ignoring the error is trivial, obviously. For stopping the VM and retrying later old code can be reused, but we need to introduce a new status for "retry a flush". For reporting to the guest, fortunately the same action is required as for a failed read/write (status = DRDY | ERR, error = ABRT), so this code can be reused as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/internal.h')
-rw-r--r--hw/ide/internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 416554324c..d652e06c45 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -472,7 +472,8 @@ struct IDEDeviceInfo {
#define BM_STATUS_INT 0x04
#define BM_STATUS_DMA_RETRY 0x08
#define BM_STATUS_PIO_RETRY 0x10
-#define BM_STATUS_RETRY_READ 0x20
+#define BM_STATUS_RETRY_READ 0x20
+#define BM_STATUS_RETRY_FLUSH 0x40
#define BM_CMD_START 0x01
#define BM_CMD_READ 0x08