AMD/IOMMU: make phantom functions share interrupt remapping tables
authorJan Beulich <jbeulich@suse.com>
Wed, 25 Sep 2019 14:00:46 +0000 (16:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Sep 2019 14:00:46 +0000 (16:00 +0200)
commit4e5e40fbd5852b2b638e5d9cf775d52f93b3fecb
tree4997436f659a21a07adf7bf6d59580c8e9fd9c6b
parentd7cfeb7c13ed60be949714cd4befa7edb3211c9b
AMD/IOMMU: make phantom functions share interrupt remapping tables

Rather than duplicating entries in amd_iommu_msi_msg_update_ire(), share
the tables. This mainly requires some care while freeing them, to avoid
freeing memory blocks twice.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/iommu_intr.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/include/asm-x86/amd-iommu.h
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h