From 700a849b561d36e71a4eca25755d9b3f6c95519e Mon Sep 17 00:00:00 2001 From: Grayson Guarino Date: Mon, 26 Oct 2026 15:24:14 -0400 Subject: [PATCH] iommu/xen: take the old domain in attach_dev Linux 6.18.58 passes the device's old domain to the attach_dev callback as a third argument. xen-iommu still had the two-argument form, so x86_64 builds with CONFIG_XEN_IOMMU fail with -Werror=incompatible-pointer-types since the rebase onto 6.18.58. The driver does not need the old domain. This matches xen-iommu.c on edera/mainline, whose upstream base already had the three-argument form. Signed-off-by: Grayson Guarino --- drivers/iommu/xen-iommu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/xen-iommu.c b/drivers/iommu/xen-iommu.c index b4c2ea39ddae6c..986cf874319eb8 100644 --- a/drivers/iommu/xen-iommu.c +++ b/drivers/iommu/xen-iommu.c @@ -48,7 +48,8 @@ static struct iommu_device xen_iommu_device; static struct pv_iommu_capabilities caps; static int xen_iommu_attach_dev(struct iommu_domain *domain, - struct device *dev); + struct device *dev, + struct iommu_domain *old); static const struct iommu_domain_ops xen_iommu_identity_ops = { .attach_dev = xen_iommu_attach_dev, @@ -332,7 +333,8 @@ static size_t xen_iommu_unmap_pages(struct iommu_domain *domain, unsigned long i return unmap.unmapped * pgsize; } -static int xen_iommu_attach_dev(struct iommu_domain *domain, struct device *dev) +static int xen_iommu_attach_dev(struct iommu_domain *domain, struct device *dev, + struct iommu_domain *old) { struct pci_dev *pdev; struct xen_iommu_domain *dom = to_xen_iommu_domain(domain);