When interrupt remapping isn't enabled, the non-remapped IOAPIC and MSI
IRQ domains can only target CPUs with APIC IDs below 256 (or 32768 in
some virtual environments). Set the appropriate max affinity for
the non-IR IRQ domains accordingly.
Note that the IOAPIC and HPET code paths touched in this patch are
used by both IR and non-IR and thus need to conditionally apply the
limit, while native_create_pci_msi_domain() is only for the non-IR
case and it doesn't need to be conditional there.
This also fixes the case where interrupt remapping is enabled but some
devices are not within the scope of any active IOMMU so they still fall
into the non-IR IRQ domain and require the same affinity limit.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
}
ip->irqdomain->parent = parent;
+ if (parent == x86_vector_domain)
+ irq_domain_set_affinity(ip->irqdomain, &x86_non_ir_cpumask);
if (cfg->type == IOAPIC_DOMAIN_LEGACY ||
cfg->type == IOAPIC_DOMAIN_STRICT)
pr_warn("Failed to initialize PCI-MSI irqdomain.\n");
} else {
d->flags |= IRQ_DOMAIN_MSI_NOMASK_QUIRK;
+ irq_domain_set_affinity(d, &x86_non_ir_cpumask);
}
return d;
}
irq_domain_free_fwnode(fn);
kfree(domain_info);
}
+ if (parent == x86_vector_domain)
+ irq_domain_set_affinity(d, &x86_non_ir_cpumask);
return d;
}