VT-d: properly reserve DID 0 for caching mode IOMMUs
authorJan Beulich <jbeulich@suse.com>
Wed, 24 Nov 2021 10:05:36 +0000 (11:05 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Nov 2021 10:05:36 +0000 (11:05 +0100)
commitb111a41acd383c42c35707dbb1849d366ca43cce
tree9ca66e449c74c17ff186d8c9011ffbfc65855e5b
parentd5c39d5f8da6a39d98fa4b5e5d7b7528dcf34e7c
VT-d: properly reserve DID 0 for caching mode IOMMUs

Merely setting bit 0 in the bitmap is insufficient, as then Dom0 will
still have DID 0 allocated to it, because of the zero-filling of
domid_map[]. Set slot 0 to DOMID_INVALID to keep DID 0 from getting
used.

Fixes: b9c20c78789f ("VT-d: per-iommu domain-id")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c