Commit ab78ffe1 authored by Pasha Tatashin's avatar Pasha Tatashin Committed by Michael S. Tsirkin

vhost-vdpa: account iommu allocations

iommu allocations should be accounted in order to allow admins to
monitor and limit the amount of iommu memory.
Signed-off-by: default avatarPasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Message-Id: <20231226182827.294158-1-pasha.tatashin@soleen.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
parent c1b9f2c6
......@@ -968,7 +968,8 @@ static int vhost_vdpa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb,
r = ops->set_map(vdpa, asid, iotlb);
} else {
r = iommu_map(v->domain, iova, pa, size,
perm_to_iommu_flags(perm), GFP_KERNEL);
perm_to_iommu_flags(perm),
GFP_KERNEL_ACCOUNT);
}
if (r) {
vhost_iotlb_del_range(iotlb, iova, iova + size - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment