AMD/IOMMU: check IVMD ranges against host implementation limits
authorJan Beulich <jbeulich@suse.com>
Fri, 15 Oct 2021 10:46:05 +0000 (12:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Oct 2021 10:46:05 +0000 (12:46 +0200)
commit6f81a70baf839a94732a6b9dd2eaf11e1aa2eff2
tree06e2b81984bc47793b97e0358783424afeebd8ff
parent87caa1c3fb872c21297fee936f6247eb09cfe840
AMD/IOMMU: check IVMD ranges against host implementation limits

When such ranges can't be represented as 1:1 mappings in page tables,
reject them as presumably bogus. Note that when we detect features late
(because of EFRSup being clear in the ACPI tables), it would be quite a
bit of work to check for (and drop) out of range IVMD ranges, so IOMMU
initialization gets failed in this case instead.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/drivers/passthrough/amd/iommu.h
xen/drivers/passthrough/amd/iommu_acpi.c
xen/drivers/passthrough/amd/iommu_detect.c
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/pci_amd_iommu.c