audk/OvmfPkg/VirtioBlkDxe
Brijesh Singh ea8314e440 OvmfPkg/VirtioBlkDxe: Check the return status of unmap data buffer
when "RequestIsWrite" is FALSE -- i.e., the CPU wants data from
the device, we map "Buffer" for VirtioOperationBusMasterWrite. In
this case, checking the return status of

Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, BufferMapping);

is must. If the unmapping fails, then "Buffer" will not contain the
actual data from the device, and we must fail the request with
EFI_DEVICE_ERROR.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
[lersek@redhat.com: fix typos in subject]
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
2017-08-30 18:53:54 +02:00
..
VirtioBlk.c OvmfPkg/VirtioBlkDxe: Check the return status of unmap data buffer 2017-08-30 18:53:54 +02:00
VirtioBlk.h OvmfPkg/VirtioBlkDxe: map VRING using VirtioRingMap() 2017-08-28 11:00:14 +02:00
VirtioBlk.inf OvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL 2013-12-11 16:58:22 +00:00