Skip to content

Commit

Permalink
vhost-vdpa: account iommu allocations
Browse files Browse the repository at this point in the history
iommu allocations should be accounted in order to allow admins to
monitor and limit the amount of iommu memory.

Signed-off-by: Pasha Tatashin <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: David Rientjes <[email protected]>
  • Loading branch information
soleen authored and mstsirkin committed Dec 27, 2023
1 parent c1b9f2c commit ab78ffe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/vhost/vdpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ab78ffe

Please sign in to comment.