VT-d: refuse to use IOMMU with reserved CAP.ND value
authorJan Beulich <jbeulich@suse.com>
Wed, 20 Apr 2022 08:54:26 +0000 (10:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 20 Apr 2022 08:54:26 +0000 (10:54 +0200)
commita1545fbf45c689aff39ce76a6eaa609d32ef72a7
tree1fa736e91fa014a1d403c0f15374e33b7302a18e
parent376f0c1b69a626b45bb9d418517d0e17f9df474b
VT-d: refuse to use IOMMU with reserved CAP.ND value

The field taking the value 7 (resulting in 18-bit DIDs when using the
calculation in cap_ndoms(), when the DID fields are only 16 bits wide)
is reserved. Instead of misbehaving in case we would encounter such an
IOMMU, refuse to use it.

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