VT-d: don't needlessly engage the untrusted-MSI workaround
authorJan Beulich <jbeulich@suse.com>
Wed, 24 Nov 2021 10:04:32 +0000 (11:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Nov 2021 10:04:32 +0000 (11:04 +0100)
commitd5c39d5f8da6a39d98fa4b5e5d7b7528dcf34e7c
tree2ef0d495c6ef14651fd4ad30321393e20af7d16e
parent0e74f62d038697d9f26052fb33bdd8325fcc4785
VT-d: don't needlessly engage the untrusted-MSI workaround

The quarantine domain doesn't count as a DomU, as it won't itself
trigger any bad behavior. The workaround only needs enabling when an
actual DomU is about to gain control of a device. This then also means
enabling of the workaround can be deferred until immediately ahead of
the call to domain_context_mapping(). While there also stop open-coding
is_hardware_domain().

Fixes: 319f9a0ba94c ("passthrough: quarantine PCI devices")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c