> 
> 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.k
> ernel.org%2Flkml%2F8f9a13ac-8ab1-15ac-06cb-
> c131b488a36f%40siemens.com%2F&data=04%7C01%7Cbram.hooimeije
> r%40prodrive-
> technologies.com%7C7a6eb63aa1f94852295408d96d38c3ba%7C612607c95af7
> 4e7f8976faf1ae77be60%7C0%7C0%7C637660912838053763%7CUnknown%7C
> TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> CJXVCI6Mn0%3D%7C1000&sdata=hwugs%2FxFhCwV1oHsSNINb7kQxk
> HYxZKezqe2%2F9nJDWo%3D&reserved=0
> happen to help in this case as well? Just crafted it recently after seeing
> spurious MSIs on enable.

I see, we will patch the kernel and try again at some point. For now we just 
removed
the switches. Will report back if I know more, but this already serves some 
future 
troubleshooters. 

Thanks for the quick reply!

Best, Bram
> 
> 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/AS8PR02MB6663D82E3518A3444F3E8CBDB6CE9%40AS8PR02MB6663.eurprd02.prod.outlook.com.

Reply via email to