summaryrefslogtreecommitdiff
path: root/kvm-stub.c
diff options
context:
space:
mode:
authorPavel Butsykin <pbutsykin@virtuozzo.com>2016-04-12 16:47:52 -0400
committerJohn Snow <jsnow@redhat.com>2016-04-12 16:47:52 -0400
commit218fd37c68e450dffe37832e82a1f0a6592e7169 (patch)
tree31b8b9dc27ca318b0bf209ecdf3e56c10758c861 /kvm-stub.c
parentd1fc684f3692d6bbe85d5ee35c2568f0bc68fa1c (diff)
downloadqemu-218fd37c68e450dffe37832e82a1f0a6592e7169.tar.gz
ide: don't lose pending dma state
If the migration occurs after the IDE DMA has been set up but before it has been initiated, the state gets lost upon save/restore. Specifically, ->dma_cb callback gets cleared, so, when the guest eventually starts bus mastering, the DMA never completes, causing the guest to time out the operation. OTOH all the infrastructure is already in place to restart the DMA if the migration happens while the DMA is in progress. So reuse that infrastructure, by setting bus->error_status based on ->dma_cmd in pre_save if ->dma_cb callback is already set but DMAING is clear. This will indicate the need for restart and make sure ->dma_cb is restored in ide_restart_bh(); howeover since DMAING is clear the state upon restore will be exactly "ready for DMA" as before the save. Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com> Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1459924806-306-2-git-send-email-den@openvz.org Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'kvm-stub.c')
0 files changed, 0 insertions, 0 deletions