On 22.02.2022 12:47, Andrew Cooper wrote: > --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c > +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c > @@ -628,7 +628,7 @@ static void cf_check amd_dump_page_tables(struct domain > *d) > hd->arch.amd.paging_mode, 0, 0); > } > > -static const struct iommu_ops __initconstrel _iommu_ops = { > +static const struct iommu_ops __initconst_cf_clobber _iommu_ops = {
Following my initcall related remark on x86'es time.c I'm afraid I don't see how this and ... > @@ -2794,7 +2793,7 @@ static int __init cf_check > intel_iommu_quarantine_init(struct domain *d) > return rc; > } > > -static struct iommu_ops __initdata vtd_ops = { > +static const struct iommu_ops __initconst_cf_clobber vtd_ops = { ... this actually works. But I guess I must be overlooking something, as I'm sure that you did test the change. Both ops structures reference a function, through .adjust_irq_affinities, which isn't __init but which is used (besides here) for an initcall. With the ENDBR removed by the time initcalls are run, these should cause #CP. Jan