summaryrefslogtreecommitdiffstats
path: root/include/qemu/compiler.h
diff options
context:
space:
mode:
authorEvgeny Yakovlev2016-07-18 21:39:50 +0200
committerJohn Snow2016-07-19 00:19:01 +0200
commit35f78ab469b1d4ea4ff7ad4ffa997ae9ad3d4120 (patch)
treedf93718f2320bab0670be1e6e4c1672ce32ff4af /include/qemu/compiler.h
parentide: refactor retry_unit set and clear into separate function (diff)
downloadqemu-35f78ab469b1d4ea4ff7ad4ffa997ae9ad3d4120.tar.gz
qemu-35f78ab469b1d4ea4ff7ad4ffa997ae9ad3d4120.tar.xz
qemu-35f78ab469b1d4ea4ff7ad4ffa997ae9ad3d4120.zip
ide: set retry_unit for PIO and FLUSH requests
The following sequence of tests discovered a problem in IDE emulation: 1. Send DMA write to IDE device 0 2. Send CMD_FLUSH_CACHE to same IDE device which will be failed by block layer using blkdebug script in tests/ide-test:test_retry_flush When doing DMA request ide/core.c will set s->retry_unit to s->unit in ide_start_dma. When dma completes ide_set_inactive sets retry_unit to -1. After that ide_flush_cache runs and fails thanks to blkdebug. ide_flush_cb calls ide_handle_rw_error which asserts that s->retry_unit == s->unit. But s->retry_unit is still -1 after previous DMA completion and flush does not use anything related to retry. This patch restricts retry unit assertion only to ops that actually use retry logic. Signed-off-by: Evgeny Yakovlev <eyakovlev@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1468870792-7411-3-git-send-email-den@openvz.org CC: Kevin Wolf <kwolf@redhat.com> CC: Max Reitz <mreitz@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Fam Zheng <famz@redhat.com> CC: John Snow <jsnow@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'include/qemu/compiler.h')
0 files changed, 0 insertions, 0 deletions