]> git.proxmox.com Git - mirror_qemu.git/commit
vdpa: Export vhost_vdpa_dma_map and unmap calls
authorEugenio Pérez <eperezma@redhat.com>
Wed, 20 Jul 2022 06:59:40 +0000 (08:59 +0200)
committerJason Wang <jasowang@redhat.com>
Wed, 20 Jul 2022 08:58:08 +0000 (16:58 +0800)
commit463ba1e3b8cf080812895c5f26d95d8d7db2e692
tree1c3ff4cbb4f335f9ff5c7f3256f134bb85b6a06b
parente966c0b781aebabd2c0f5eef91678f08ce1d068c
vdpa: Export vhost_vdpa_dma_map and unmap calls

Shadow CVQ will copy buffers on qemu VA, so we avoid TOCTOU attacks from
the guest that could set a different state in qemu device model and vdpa
device.

To do so, it needs to be able to map these new buffers to the device.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/vhost-vdpa.c
include/hw/virtio/vhost-vdpa.h