[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v3 15/29] vhost: Add enable_custom_iommu to VhostOps
From: |
Eugenio Pérez |
Subject: |
[RFC v3 15/29] vhost: Add enable_custom_iommu to VhostOps |
Date: |
Wed, 19 May 2021 18:28:49 +0200 |
This operation enable the backend-specific IOTLB entries.
If a backend support this, it start managing its own entries, and vhost
can disable it through this operation and recover control.
Every enable/disable operation must also clear all IOTLB device entries.
At the moment, the only backend that does so is vhost-vdpa. To fully
support these, vdpa needs also to expose a way for vhost subsystem to
map and unmap entries. This will be done in future commits.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
include/hw/virtio/vhost-backend.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/hw/virtio/vhost-backend.h
b/include/hw/virtio/vhost-backend.h
index bcb112c166..f8eed2ace5 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -128,6 +128,9 @@ typedef bool (*vhost_force_iommu_op)(struct vhost_dev *dev);
typedef int (*vhost_vring_pause_op)(struct vhost_dev *dev);
+typedef int (*vhost_enable_custom_iommu_op)(struct vhost_dev *dev,
+ bool enable);
+
typedef int (*vhost_get_iova_range)(struct vhost_dev *dev,
hwaddr *first, hwaddr *last);
@@ -177,6 +180,7 @@ typedef struct VhostOps {
vhost_get_device_id_op vhost_get_device_id;
vhost_vring_pause_op vhost_vring_pause;
vhost_force_iommu_op vhost_force_iommu;
+ vhost_enable_custom_iommu_op vhost_enable_custom_iommu;
vhost_get_iova_range vhost_get_iova_range;
} VhostOps;
--
2.27.0
- [RFC v3 08/29] vhost: Route host->guest notification through shadow virtqueue, (continued)
- [RFC v3 08/29] vhost: Route host->guest notification through shadow virtqueue, Eugenio Pérez, 2021/05/19
- [RFC v3 09/29] vhost: Avoid re-set masked notifier in shadow vq, Eugenio Pérez, 2021/05/19
- [RFC v3 10/29] virtio: Add vhost_shadow_vq_get_vring_addr, Eugenio Pérez, 2021/05/19
- [RFC v3 11/29] vhost: Add vhost_vring_pause operation, Eugenio Pérez, 2021/05/19
- [RFC v3 12/29] vhost: add vhost_kernel_vring_pause, Eugenio Pérez, 2021/05/19
- [RFC v3 13/29] vhost: Add vhost_get_iova_range operation, Eugenio Pérez, 2021/05/19
- [RFC v3 14/29] vhost: add vhost_has_limited_iova_range, Eugenio Pérez, 2021/05/19
- [RFC v3 15/29] vhost: Add enable_custom_iommu to VhostOps,
Eugenio Pérez <=
- [RFC v3 16/29] vhost-vdpa: Add vhost_vdpa_enable_custom_iommu, Eugenio Pérez, 2021/05/19
- [RFC v3 17/29] vhost: Shadow virtqueue buffers forwarding, Eugenio Pérez, 2021/05/19
- [RFC v3 18/29] vhost: Use vhost_enable_custom_iommu to unmap everything if available, Eugenio Pérez, 2021/05/19
- [RFC v3 19/29] vhost: Check for device VRING_USED_F_NO_NOTIFY at shadow virtqueue kick, Eugenio Pérez, 2021/05/19
- [RFC v3 20/29] vhost: Use VRING_AVAIL_F_NO_INTERRUPT at device call on shadow virtqueue, Eugenio Pérez, 2021/05/19
- [RFC v3 21/29] vhost: Add VhostIOVATree, Eugenio Pérez, 2021/05/19
- [RFC v3 22/29] vhost: Add iova_rev_maps_find_iova to IOVAReverseMaps, Eugenio Pérez, 2021/05/19
- [RFC v3 23/29] vhost: Use a tree to store memory mappings, Eugenio Pérez, 2021/05/19