Skip to content

Commit ab78ffe

Browse files
soleenmstsirkin
authored andcommitted
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: Pasha Tatashin <pasha.tatashin@soleen.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20231226182827.294158-1-pasha.tatashin@soleen.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: David Rientjes <rientjes@google.com>
1 parent c1b9f2c commit ab78ffe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/vhost/vdpa.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,8 @@ static int vhost_vdpa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb,
968968
r = ops->set_map(vdpa, asid, iotlb);
969969
} else {
970970
r = iommu_map(v->domain, iova, pa, size,
971-
perm_to_iommu_flags(perm), GFP_KERNEL);
971+
perm_to_iommu_flags(perm),
972+
GFP_KERNEL_ACCOUNT);
972973
}
973974
if (r) {
974975
vhost_iotlb_del_range(iotlb, iova, iova + size - 1);

0 commit comments

Comments
 (0)