> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > Sent: Monday, November 21, 2022 10:38 PM > > +bool pci_dev_has_default_msi_parent_domain(struct pci_dev *dev) > +{ > + struct irq_domain *domain = dev_get_msi_domain(&dev->dev); > > -int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, > - msi_alloc_info_t *arg) > + if (!domain) > + domain = dev_get_msi_domain(&dev->bus->dev); > + if (!domain) > + return false; > + > + return domain == x86_vector_domain; the function name is about parent domain but there is no check on the parent flag. Probably just remove 'parent'? > +/** > + * x86_init_dev_msi_info - Domain info setup for MSI domains > + * @dev: The device for which the domain should be created > + * @domain: The (root) domain providing this callback what is the purpose of '(root)'? it's also used by intermediate domain i.e. IR. > + > + /* > + * Mask out the domain specific MSI feature flags which are not > + * supported by the real parent. > + */ > + info->flags &= pops->supported_flags; > + /* Enforce the required flags */ > + info->flags |= > X86_VECTOR_MSI_FLAGS_REQUIRED; > + > + /* This is always invoked from the top level MSI domain! */ > + info->ops->msi_prepare = x86_msi_prepare; > + > + info->chip->irq_ack = irq_chip_ack_parent; > + info->chip->irq_retrigger = irq_chip_retrigger_hierarchy; > + info->chip->flags |= IRQCHIP_SKIP_SET_WAKE | > + IRQCHIP_AFFINITY_PRE_STARTUP; Above are executed twice for both IR and vector after next patch comes. Could skip it for IR.