vtd: optimize CPU cache sync
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 7 Jul 2020 12:39:54 +0000 (14:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 12:39:54 +0000 (14:39 +0200)
commita64ea16522a73a13a0d66cfa4b66a9d3b95dd9d6
tree513e6ed8a2e34581c66882de9f578908e5197f28
parent23570bce00ee6ba2139ece978ab6f03ff166e21d
vtd: optimize CPU cache sync

Some VT-d IOMMUs are non-coherent, which requires a cache write back
in order for the changes made by the CPU to be visible to the IOMMU.
This cache write back was unconditionally done using clflush, but there are
other more efficient instructions to do so, hence implement support
for them using the alternative framework.

This is part of XSA-321.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/x86/vtd.c