]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/PvScsiDxe: Introduce DMA communication buffer
authorLiran Alon <liran.alon@oracle.com>
Sat, 28 Mar 2020 20:00:57 +0000 (23:00 +0300)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 30 Mar 2020 16:45:07 +0000 (16:45 +0000)
commit6510e1979491d28c82944e0cfdab5713d482efa1
tree7d371356f51731ec9dbcf7c89241a32262afa3e6
parentb654edec034a5e5dcc440f2f30fd2aa6c31aef3c
OvmfPkg/PvScsiDxe: Introduce DMA communication buffer

In case device is constrained by IOMMU or guest is running under AMD SEV,
input/output buffers provided to device (DataBuffer and SenseData) needs
to be explicitly mapped to device by PciIo->Map().

To avoid the overhead of mapping/unmapping the DataBuffer and SenseData
to the device for every SCSI requst (and to simplify code), introduce a
single DMA communication buffer that will be mapped to device on
initialization. When a SCSI request needs to be sent to device, the
DataBuffer and SenseData will be copied from/to the DMA communication
buffer as required. This will be done by the following commits.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Message-Id: <20200328200100.60786-15-liran.alon@oracle.com>
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/PvScsiDxe/PvScsi.c
OvmfPkg/PvScsiDxe/PvScsi.h