When force unbinding a MSI the used IRQ would get added to the domain irq-pirq tree as -irq -pirq, thus preventing the same IRQ to be used by the domain. Doing so for MSI allocated IRQs prevents the same IRQ to be used for any other device, since MSI IRQs are allocated and deallocated on demand unlike legacy PCI IRQs.
Ignore forced unbinds for MSI IRQs and just cleanup the irq-pirq information as normal. Signed-off-by: Roger Pau Monné <roger....@citrix.com> --- It's not clear to me why we add the irq as -irq -pirq to the irq-pirq domain tree on forced unbind, as allowing to bind the irq again should just work regardless of whether it has been previously forcefully unbound? --- xen/arch/x86/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 49849bd7d3..c8e5277eb1 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2362,7 +2362,7 @@ int unmap_domain_pirq(struct domain *d, int pirq) { BUG_ON(irq != domain_pirq_to_irq(d, pirq + i)); - if ( !forced_unbind ) + if ( !forced_unbind || msi_desc ) clear_domain_irq_pirq(d, irq, info); else { -- 2.29.2