x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init()

Invoking x86_init.irqs.create_pci_msi_domain() before
x86_init.pci.arch_init() breaks XEN PV.

The XEN_PV specific pci.arch_init() function overrides the default
create_pci_msi_domain() which is obviously too late.

As a consequence the XEN PV PCI/MSI allocation goes through the native
path which runs out of vectors and causes malfunction.

Invoke it after x86_init.pci.arch_init().

Fixes: 6b15ffa07dc3 ("x86/irq: Initialize PCI/MSI domain at PCI init time")
Reported-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Juergen Gross <jgross@suse.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/87pn18djte.fsf@nanos.tec.linutronix.de

Changed files
+11 -4
arch
x86
pci
+11 -4
arch/x86/pci/init.c
··· 9 9 in the right sequence from here. */ 10 10 static __init int pci_arch_init(void) 11 11 { 12 - int type; 13 - 14 - x86_create_pci_msi_domain(); 12 + int type, pcbios = 1; 15 13 16 14 type = pci_direct_probe(); 17 15 18 16 if (!(pci_probe & PCI_PROBE_NOEARLY)) 19 17 pci_mmcfg_early_init(); 20 18 21 - if (x86_init.pci.arch_init && !x86_init.pci.arch_init()) 19 + if (x86_init.pci.arch_init) 20 + pcbios = x86_init.pci.arch_init(); 21 + 22 + /* 23 + * Must happen after x86_init.pci.arch_init(). Xen sets up the 24 + * x86_init.irqs.create_pci_msi_domain there. 25 + */ 26 + x86_create_pci_msi_domain(); 27 + 28 + if (!pcbios) 22 29 return 0; 23 30 24 31 pci_pcbios_init();