Re: [PATCH v2 5/5] vfio/iommu_type1: Simplify group attachment

From
Jason Gunthorpe <jgg@nvidia.com>
Date
2022-06-20 04:03:44
Also in
kvm, linux-arm-msm, linux-iommu, linux-mediatek, linux-s390, linux-tegra, lkml
Reply to
Nicolin Chen, 2022-06-17
On Fri, Jun 17, 2022 at 04:07:20PM -0700, Nicolin Chen wrote:
quoted
quoted
quoted
quoted
+     vfio_iommu_aper_expand(iommu, &iova_copy);
but now it's done for every group detach. The aperture is decided
by domain geometry which is not affected by attached groups.
Yea, I've noticed this part. Actually Jason did this change for
simplicity, and I think it'd be safe to do so?
Perhaps detach_destroy() can return a Boolean to indicate whether
a domain is destroyed.
It could be a solution but doesn't feel that common for a clean
function to have a return value indicating a special case. Maybe
passing in "&domain" so that we can check if it's NULL after?
It is harmless to do every time, it just burns a few CPU cycles on a
slow path. We don't need complexity to optmize it.

Jason

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (30 messages) 30 messages, 6 authors, last reply 2022-06-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help