Joerg,
The attributes you have defined look good and are mechanisms we need
to determine if iommu is aperture based, get max # of windows, set
actual number of windows, etc.
However, there are a couple of other attributes we need:
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 8330df1..0038c39 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -61,6 +61,8 @@ enum iommu_attr {
DOMAIN_ATTR_GEOMETRY,
DOMAIN_ATTR_PAGING,
DOMAIN_ATTR_WINDOWS,
+ DOMAIN_ATTR_ENABLE,
+ DOMAIN_ATTR_FSL_PAMUV1,
DOMAIN_ATTR_MAX,
};
We need a mechanism to enable/disable the overall aperture, and that
is what DOMAIN_ATTR_ENABLE is for. After everything is configured we
enable the overall aperture...and can't do it before.
There are a lot of quirky, very specific constraints that apply to
PAMU only (most likely) and may not be generic. Here are the ones I
can think of:
-aperture must be power of 2, and naturally aligned
-number of windows must be power of 2, and address space size
of each window is determined by aperture size / # of windows
-the actual size of the mapped region of a window must be power
of 2 starting with 4KB and physical address must be
naturally aligned
Instead of advertising those constraints somehow, it seem easier just
to advertise that this IOMMU is a PAMU v1. The attribute would be
read only and would be a boolean-- if the attribute is present then
it's a PAMU v1.
Wanted to get your thoughts on that.
Thanks,
Stuart
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu