]> Git Repo - qemu.git/commit - hw/ide/core.c
ide: convert ide_sector_read() to asynchronous I/O
authorStefan Hajnoczi <[email protected]>
Thu, 29 Mar 2012 09:31:30 +0000 (10:31 +0100)
committerKevin Wolf <[email protected]>
Thu, 19 Apr 2012 14:03:27 +0000 (16:03 +0200)
commitbef0fd5958120542f126f2dedbfce65d8839a94d
treebd1dab13e51821dc3ad80d8fb18faf39e6a24475
parent592fa07043095ba3141fb9d413693d3c202cba9a
ide: convert ide_sector_read() to asynchronous I/O

The IDE PIO interface currently uses bdrv_read() to perform reads
synchronously.  Synchronous I/O in the vcpu thread is bad because it
prevents the guest from executing code - it makes the guest
unresponsive.

This patch converts IDE PIO to use bdrv_aio_readv().  We simply need to
use the BUSY_STAT status so the guest knows to wait while we are busy.

The only external user of ide_sector_read() is restart behavior on I/O
errors and it is not affected by this change.  We still need to restart
I/O in the same way.

Migration is also unaffected if I understand the code correctly.  We
continue to use the same transfer function and the BUSY_STAT status
should never be migrated since we flush I/O before migrating device
state.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Zhi Yong Wu <[email protected]>
Tested-by: Richard Davies <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
hw/ide/core.c
hw/ide/internal.h
This page took 0.020999 seconds and 4 git commands to generate.