On 30.06.2022 10:54, Roger Pau Monne wrote: > Using nr_irqs minus nr_irqs_gsi is misleading, as GSI interrupts are > not allocated unless requested by the hardware domain, so a hardware > domain could not use any GSI (or just one for the ACPI SCI), and hence > (almost) all nr_irqs will be available for MSI(-X) usage.
Looking at create_irq() I find a loop going from nr_irqs_gsi to nr_irqs. Similar in get_free_pirq(). All lower numbers aren't eligible for use by MSI/MSI-X. We can't allow the lower ones to be used for other than GSI purposes because we can't know whether any device will become enabled (perhaps long after boot) which wants to use a specific GSI. Jan