Skip to content

Commit 70245f8

Browse files
committed
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: 6b15ffa ("x86/irq: Initialize PCI/MSI domain at PCI init time") Reported-by: Juergen Gross <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Juergen Gross <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 256b92a commit 70245f8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

arch/x86/pci/init.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,23 @@
99
in the right sequence from here. */
1010
static __init int pci_arch_init(void)
1111
{
12-
int type;
13-
14-
x86_create_pci_msi_domain();
12+
int type, pcbios = 1;
1513

1614
type = pci_direct_probe();
1715

1816
if (!(pci_probe & PCI_PROBE_NOEARLY))
1917
pci_mmcfg_early_init();
2018

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)
2229
return 0;
2330

2431
pci_pcbios_init();

0 commit comments

Comments
 (0)