On 07.06.2023 05:02, Stewart Hildebrand wrote: > --- a/xen/include/xen/iommu.h > +++ b/xen/include/xen/iommu.h > @@ -26,6 +26,9 @@ > #include <xen/spinlock.h> > #include <public/domctl.h> > #include <public/hvm/ioreq.h> > +#ifdef CONFIG_ACPI > +#include <asm/acpi.h> > +#endif
This header is supposed to be usable without #ifdef, and then ... > @@ -228,12 +232,28 @@ int iommu_release_dt_devices(struct domain *d); > * (IOMMU is not enabled/present or device is not connected to it). > */ > int iommu_add_dt_device(struct dt_device_node *np); > +int iommu_add_dt_pci_sideband_ids(struct pci_dev *pdev); > > int iommu_do_dt_domctl(struct xen_domctl *, struct domain *, > XEN_GUEST_HANDLE_PARAM(xen_domctl_t)); > > +#else /* !HAS_DEVICE_TREE */ > +static inline int iommu_add_dt_pci_sideband_ids(struct pci_dev *pdev) > +{ > + return 0; > +} > #endif /* HAS_DEVICE_TREE */ > > +static inline int iommu_add_pci_sideband_ids(struct pci_dev *pdev) > +{ > + int ret = 0; > +#ifdef CONFIG_ACPI > + if ( acpi_disabled ) > +#endif ... you don't need #ifdef here either. > + ret = iommu_add_dt_pci_sideband_ids(pdev); > + return ret; > +} Also (nit) please follow (partly unwritten, I admit) style guidelines: A blank line between declaration(s) and statement(s), and another one ahead of a function's main "return". Jan