Thread (26 messages) read the whole thread 26 messages, 5 authors, 2022-06-15

Re: [PATCH 2/5] iommu: Ensure device has the same iommu_ops as the domain

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2022-06-06 18:52:35
Also in: kvm, linux-arm-msm, linux-iommu, linux-mediatek, linux-rockchip, linux-s390, linux-samsung-soc, linux-sunxi, linux-tegra, lkml

On Mon, Jun 06, 2022 at 11:28:49AM -0700, Nicolin Chen wrote:
quoted
Well, as before I'd prefer to make the code match the commit message -
if I really need to spell it out, see below - since I can't imagine that
we should ever have need to identify a set of iommu_domain_ops in
isolation, therefore I think it's considerably clearer to use the
iommu_domain itself. However, either way we really don't need this yet,
so we may as well just go ahead and remove the redundant test from VFIO
anyway, and I can add some form of this patch to my dev branch for now.
I see. The version below is much cleaner. Yet, it'd become having a
common pointer per iommu_domain vs. one pointer per driver. Jason
pointed it out to me earlier that by doing so memory waste would be
unnecessary on platforms that have considerable numbers of masters.
I had ment using struct iommu_domain when there is a simple solution
to use rodata doesn't seem ideal.

I don't quite understand the reluctance to make small changes to
drivers, it was the same logic with the default_domain_ops thing too.
Since we know that it'd be safe to exclude this single change from
this series, I can drop it in next version, if you don't like the
change.
But this is fine too, that really is half the point of this series..

Jason

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help