Dear Jailhouse Community,

I am runing Jailhouse on kernel v5.4, and port some ivshmem patches from 
http://git.kiszka.org/?p=linux.git;a=summary

The issue I have is uio_shmem and ivshmem-net will probe failed when I use 
MSI-X mode for vPCI after I run Jailhouse enable command.  Please find the 
folowing log:

[   21.581019] jailhouse: loading out-of-tree module taints kernel.

[   30.000988] pci-host-generic fb500000.pci: host bridge /pci@0 ranges:

[   30.000997] pci-host-generic fb500000.pci:   MEM 0xfb600000..0xfb603fff 
-> 0xfb600000

[   30.001028] pci-host-generic fb500000.pci: ECAM at [mem 
0xfb500000-0xfb5fffff] for [bus 00]

[   30.001081] pci-host-generic fb500000.pci: PCI host bridge to bus 0003:00

[   30.001085] pci_bus 0003:00: root bus resource [bus 00]

[   30.001087] pci_bus 0003:00: root bus resource [mem 
0xfb600000-0xfb603fff]

[   30.001105] pci 0003:00:00.0: [110a:4106] type 00 class 0xff0000

[   30.001128] pci 0003:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff]

[   30.001136] pci 0003:00:00.0: reg 0x14: [mem 0x00000000-0x000001ff]

[   30.001340] pci 0003:00:01.0: [110a:4106] type 00 class 0xff0001

[   30.001359] pci 0003:00:01.0: reg 0x10: [mem 0x00000000-0x00000fff]

[   30.001368] pci 0003:00:01.0: reg 0x14: [mem 0x00000000-0x000001ff]

[   30.002389] pci 0003:00:00.0: BAR 0: assigned [mem 0xfb600000-0xfb600fff]

[   30.002397] pci 0003:00:01.0: BAR 0: assigned [mem 0xfb601000-0xfb601fff]

[   30.002403] pci 0003:00:00.0: BAR 1: assigned [mem 0xfb602000-0xfb6021ff]

[   30.002409] pci 0003:00:01.0: BAR 1: assigned [mem 0xfb602200-0xfb6023ff]

[   30.002478] uio_ivshmem 0003:00:00.0: enabling device (0000 -> 0002)

[   30.002505] uio_ivshmem 0003:00:00.0: state_table at 0x00000000fb700000, 
size 0x0000000000001000

[   30.002512] uio_ivshmem 0003:00:00.0: rw_section at 0x00000000fb701000, 
size 0x0000000000009000

[   30.002520] uio_ivshmem 0003:00:00.0: input_sections at 
0x00000000fb70a000, size 0x0000000000006000

[   30.002524] uio_ivshmem 0003:00:00.0: output_section at 
0x00000000fb70a000, size 0x0000000000002000

[   30.002576] uio_ivshmem: probe of 0003:00:00.0 failed with error -28

[   30.002620] ivshmem-net 0003:00:01.0: enabling device (0000 -> 0002)

[   30.002664] ivshmem-net 0003:00:01.0: TX memory at 0x00000000fb801000, 
size 0x000000000007f000

[   30.002667] ivshmem-net 0003:00:01.0: RX memory at 0x00000000fb880000, 
size 0x000000000007f000

[   30.047630] ivshmem-net: probe of 0003:00:01.0 failed with error -28

[   30.047714] The Jailhouse is opening.

After some investigation I found the dts node of vPIC is added to root cell 
by using vpci_template.dts,  the Jailhouse driver create_vpci_of_overlay() 
in driver/pci.c can't add the handler of "msi-parent" to this PCI node,  
but the kernel driver of the virtual PCI device use the following function 
ret = pci_alloc_irq_vectors(pdev, 1, 2, PCI_IRQ_LEGACY | PCI_IRQ_MSIX);
So the  driver will probe MSIX irq for the device, because there is no msi 
controller is speficied to vPCI, the result is no irq-domain is provided to 
this PCI and irq allocated failed.

so how to fix such issue? Appreciate any comments and suggestions, thanks.

Best Regards,
Jiafei.

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/e223356c-fc2c-4c3b-98c3-6d27fba1099an%40googlegroups.com.

Reply via email to