ide: add support for IDEBufferedRequest
commit1d8c11d631545ee43aff16b0763aff7181b61f20
authorPeter Lieven <pl@kamp.de>
Tue, 17 Nov 2015 20:06:25 +0000 (17 15:06 -0500)
committerJohn Snow <jsnow@redhat.com>
Tue, 17 Nov 2015 20:06:25 +0000 (17 15:06 -0500)
tree8606957a184aa43146edb7771e3c1966d24ce1e4
parentca78ecfa72f311cd647b12a41d93e1ce54f18e66
ide: add support for IDEBufferedRequest

this patch adds a new aio readv compatible function which copies
all data through a bounce buffer. These buffered requests can be
flagged as orphaned which means that their original callback has
already been invoked and the request has just not been completed
by the backend storage. The bounce buffer guarantees that guest
memory corruption is avoided when such a orphaned request is
completed by the backend at a later stage.

This trick only works for read requests as a write request completed
at a later stage might corrupt data as there is no way to control
if and what data has already been written to the storage.

Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1447345846-15624-4-git-send-email-pl@kamp.de
Signed-off-by: John Snow <jsnow@redhat.com>
hw/ide/core.c
hw/ide/internal.h