On 01.09.21 13:01, Bram Hooimeijer wrote:
> Dear Jailhouse community, 
> 
> Currently I am running into an issue enabling Jailhouse on a x86-based server 
> platform. 
> 
> The error triggered is
> FATAL: Unsupported MSI/MSI-X state, device xx:xx.x, cap 5
> from hypervisor/pci.c, line 833. 
> 
> This is traced back via
> hypervisor/pci.c:             pci_config_commit
> hypervisor/arch/x86/pci.c:    arch_pci_update_msi
> hypervisor/arch/x86/vtd.c:    iommu_map_interrupt
> 
> where the check irte.field.sid != device_id fails.
> 
> The device for which this fails is a PCI bridge. The check fails for
> vector 8
> sid  0x5F40
> device_id 0x5E00
> 
> The device_id corresponds to the upstream switch port, the sid corresponds to 
> the downstream switch port. See the sysconfig snippet below.
> 
> The sysconfig discovers 8 msi_vectors for the upstream port, so this failing 
> at
> vector 8 makes quite some sense. However, the value of vectors in
> arch_pci_update_msi is 128! I.e, tries to access up to 128 vector, which 
> seems 
> much too high. This value comes from union pci_msi_registers. Could that be 
> misconfigured in the case of a bridge?
> 
> Does anybody have an idea what goes wrong here?
> Is this on the Jailhouse side, or is the switch misconfigured?
> 
> PS, Removing the bridges fixes the error.
> 
> Thanks for the support!
> 
> Best regards, Bram Hooimeijer
> 
>     /* PCIDevice: 5e:00.0: Upstream port*/
>     {
>             .type = JAILHOUSE_PCI_TYPE_BRIDGE,
>             .iommu = 6,
>             .domain = 0x0,
>             .bdf = 0x5e00,
>             .bar_mask = {
>                     0xfffc0000, 0x00000000, 0x00000000,
>                     0x00000000, 0x00000000, 0x00000000,
>             },
>             .caps_start = 80,
>             .num_caps = 12,
>             .num_msi_vectors = 8,
>             .msi_64bits = 1,
>             .msi_maskable = 1,
>             .num_msix_vectors = 0,
>             .msix_region_size = 0x0,
>             .msix_address = 0x0,
>     },
>     /* PCIDevice: 5f:08.0 Downstream port*/
>     {
>             .type = JAILHOUSE_PCI_TYPE_BRIDGE,
>             .iommu = 6,
>             .domain = 0x0,
>             .bdf = 0x5f40,
>             .bar_mask = {
>                     0x00000000, 0x00000000, 0x00000000,
>                     0x00000000, 0x00000000, 0x00000000,
>             },
>             .caps_start = 92,
>             .num_caps = 12,
>             .num_msi_vectors = 8,
>             .msi_64bits = 1,
>             .msi_maskable = 1,
>             .num_msix_vectors = 0,
>             .msix_region_size = 0x0,
>             .msix_address = 0x0,
>     },
>     /* PCIDevice: 5f:10.0 Downstream port */
>     {
>             .type = JAILHOUSE_PCI_TYPE_BRIDGE,
>             .iommu = 6,
>             .domain = 0x0,
>             .bdf = 0x5f80,
>             .bar_mask = {
>                     0x00000000, 0x00000000, 0x00000000,
>                     0x00000000, 0x00000000, 0x00000000,
>             },
>             .caps_start = 92,
>             .num_caps = 12,
>             .num_msi_vectors = 8,
>             .msi_64bits = 1,
>             .msi_maskable = 1,
>             .num_msix_vectors = 0,
>             .msix_region_size = 0x0,
>             .msix_address = 0x0,
>     },
> 

Does
https://lore.kernel.org/lkml/[email protected]/
happen to help in this case as well? Just crafted it recently after
seeing spurious MSIs on enable.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

-- 
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/3e7cea78-3cba-030a-3896-0607fda06f9e%40siemens.com.

Reply via email to