23/07/2019 11:57, Burakov, Anatoly:
> A machine without an IOMMU shouldn't have picked IOVA as VA in the first
> place. Perhaps this is something we could fix? I'm not sure how to
> detected that condition though, i don't think there's a mechanism to
> know that for sure. Some kernels create a "iommu" sysfs directories, but
> i'm not too sure if they're 1) there for older kernels we support, and
> 2) always there.
[..]
> On my machine, "/sys/devices/virtual/iommu" exists when IOMMU is
> enabled, but doesn't exist if it isn't ("/sys/class/iommu" exists in
> both cases, but is empty when IOMMU is disabled). Perhaps we could go
> off that?
Yes, good idea.
We need to check how these sysfs entries are managed,
and how old they are by looking at Linux code history.