AMD/IOMMU: provide function backing XENMEM_reserved_device_memory_map
authorJan Beulich <jbeulich@suse.com>
Wed, 22 Sep 2021 14:16:28 +0000 (16:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 22 Sep 2021 14:16:28 +0000 (16:16 +0200)
commit2209c36007ec209ab1189ac0bfd5144a2db80090
tree576c86202e9f4c16355e659cef89b52c1b3fecff
parenta0fe9a1e8c1f28ac528625bd3be99e14a74253ee
AMD/IOMMU: provide function backing XENMEM_reserved_device_memory_map

Just like for VT-d, exclusion / unity map ranges would better be
reflected in e.g. the guest's E820 map. The reporting infrastructure
was put in place still pretty tailored to VT-d's needs; extend
get_reserved_device_memory() to allow vendor specific code to probe
whether a particular (seg,bus,dev,func) tuple would get its data
actually recorded. I admit the de-duplication of entries is quite
limited for now, but considering our trouble to find a system
surfacing _any_ IVMD this is likely not a critical issue for this
initial implementation.

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