Joerg Roedel <j...@8bytes.org> wrote:

> On Fri, Jun 24, 2016 at 06:13:14AM -0700, Nadav Amit wrote:
>> According to the manual: "Hardware access to ...  invalidation queue ...
>> are always coherent."
>> 
>> Remove unnecassary clflushes accordingly.
> 
> It is one thing what the spec says and another how hardware really
> behaves. Have you tested this on (potentially really old) VT-d machines
> to make sure the spec is _always_ right here?

No I didn’t as the commit message says. I would be happy for someones’
tested-by.

Having said that - FreeBSD does not do these (unnecessary)
invalidations [1], and their code comment clearly says it. Since this code
is not new, I would assume FreeBSD would crash by now if the code was
buggy.

Although such hardware is old, there are some hypervisors that do not set
the ecap.coherency of emulated IOMMUs. Yes, it is unwise, but there is no
reason to further punish these hypervisors.

Thanks,
Nadav

[1] http://web.mit.edu/freebsd/head/sys/x86/iommu/intel_qi.c
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to