summaryrefslogtreecommitdiffstats
path: root/include/hw/virtio
diff options
context:
space:
mode:
authorJason Wang2020-09-07 12:49:03 +0200
committerMichael S. Tsirkin2020-09-29 08:14:29 +0200
commita5bd05800f8659851d9d0a1546726e16b7da9db3 (patch)
tree5188269fbdeb733e563d73f743dc374f5404c825 /include/hw/virtio
parentvhost: switch to use IOTLB v2 format (diff)
downloadqemu-a5bd05800f8659851d9d0a1546726e16b7da9db3.tar.gz
qemu-a5bd05800f8659851d9d0a1546726e16b7da9db3.tar.xz
qemu-a5bd05800f8659851d9d0a1546726e16b7da9db3.zip
vhost-vdpa: batch updating IOTLB mappings
To speed up the memory mapping updating between vhost-vDPA and vDPA device driver, this patch passes the IOTLB batching flags via IOTLB API. Two new flags was introduced, VHOST_IOTLB_BATCH_BEGIN is a hint that a bathced IOTLB updating may be initiated from the userspace. VHOST_IOTLB_BATCH_END is a hint that userspace has finished the updating: VHOST_IOTLB_BATCH_BEGIN VHOST_IOTLB_UPDATE/VHOST_IOTLB_INVALIDATE ... VHOST_IOTLB_BATCH_END Vhost-vDPA can then know that all mappings has been set and can do optimization like passing all the mappings to the vDPA device driver. Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20200907104903.31551-4-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio')
-rw-r--r--include/hw/virtio/vhost-vdpa.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
index 6455663388..9b81a409da 100644
--- a/include/hw/virtio/vhost-vdpa.h
+++ b/include/hw/virtio/vhost-vdpa.h
@@ -18,6 +18,7 @@ typedef struct vhost_vdpa {
int device_fd;
uint32_t msg_type;
MemoryListener listener;
+ struct vhost_dev *dev;
} VhostVDPA;
extern AddressSpace address_space_memory;