vtd: optimize CPU cache sync
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 7 Jul 2020 13:24:30 +0000 (15:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 13:24:30 +0000 (15:24 +0200)
commitf2bc74c120bdb25446684c5375d1cc51d4702da4
treee95cbd013d19d991aa587f54156b5deb00c23cda
parentd62365801ae339f00708cd66aef7d53caea685ad
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>
master commit: a64ea16522a73a13a0d66cfa4b66a9d3b95dd9d6
master date: 2020-07-07 14:39:54 +0200
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/x86/vtd.c