VT-d: fix caching mode IOTLB flushing
authorJan Beulich <jbeulich@suse.com>
Fri, 27 Aug 2021 08:52:15 +0000 (10:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Aug 2021 08:52:15 +0000 (10:52 +0200)
commitc5c84e97669dd5c92b59b04b2ab4233605da09dd
treecd15e10ddbd53bd9b7c82c57eacc238d8425a5be
parentc08d68cd2aacbc7cb56e73ada241bfe4639bbc68
VT-d: fix caching mode IOTLB flushing

While for context cache entry flushing use of did 0 is indeed correct
(after all upon reading the context entry the IOMMU wouldn't know any
domain ID if the entry is not present, and hence a surrogate one needs
to be used), for IOTLB entries the normal domain ID (from the [present]
context entry) gets used. See sub-section "IOTLB" of section "Address
Translation Caches" in the VT-d spec.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/qinval.c