From: Andrew Cooper Date: Mon, 11 Nov 2019 20:46:08 +0000 (+0000) Subject: AMD/IOMMU: Fix passthrough following c/s d7cfeb7c13e X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1194 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=aaef3d904bbbde1fcf9c07943878bd2aa64cc2bc;p=xen.git AMD/IOMMU: Fix passthrough following c/s d7cfeb7c13e "AMD/IOMMU: don't blindly allocate interrupt remapping tables" introduces a call at runtime from amd_iommu_add_device() to amd_iommu_set_intremap_table() which is still marked as __init. On one AMD Rome machine we have, this results in a crash the moment we try to use an SR-IOV VF in a VM. Reported-by: Jennifer Herbert Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Release-acked-by: Juergen Gross --- diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c index 03c1ad4dc5..cd5c7de7c5 100644 --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -112,7 +112,7 @@ void amd_iommu_set_root_page_table(struct amd_iommu_dte *dte, dte->v = valid; } -void __init amd_iommu_set_intremap_table( +void amd_iommu_set_intremap_table( struct amd_iommu_dte *dte, const void *ptr, const struct amd_iommu *iommu, bool valid) {