The GICv5 ITS MSI controller requires one MSI cell carrying the DeviceID. Describe an identity mapping from the 16-bit PCI requester ID to the ITS DeviceID with msi-map. Keep the existing msi-parent property for GICv2m and GICv3 ITS. Signed-off-by: Sascha Bischoff --- arm64/pci.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arm64/pci.c b/arm64/pci.c index 0ba2f9c9..912165ef 100644 --- a/arm64/pci.c +++ b/arm64/pci.c @@ -32,6 +32,12 @@ void pci__generate_fdt_nodes(void *fdt, struct kvm *kvm) unsigned nentries = 0; /* Bus range */ u32 bus_range[] = { cpu_to_fdt32(0), cpu_to_fdt32(0), }; + u32 msi_map[] = { + cpu_to_fdt32(0), + cpu_to_fdt32(PHANDLE_MSI), + cpu_to_fdt32(0), + cpu_to_fdt32(0x10000), + }; /* Configuration Space */ u64 cfg_reg_prop[] = { cpu_to_fdt64(KVM_PCI_CFG_AREA), cpu_to_fdt64(ARM_PCI_CFG_SIZE), }; @@ -70,7 +76,9 @@ void pci__generate_fdt_nodes(void *fdt, struct kvm *kvm) _FDT(fdt_property(fdt, "reg", &cfg_reg_prop, sizeof(cfg_reg_prop))); _FDT(fdt_property(fdt, "ranges", ranges, sizeof(ranges))); - if (irqchip == IRQCHIP_GICV2M || irqchip == IRQCHIP_GICV3_ITS) + if (irqchip == IRQCHIP_GICV5_ITS) + _FDT(fdt_property(fdt, "msi-map", msi_map, sizeof(msi_map))); + else if (irqchip == IRQCHIP_GICV2M || irqchip == IRQCHIP_GICV3_ITS) _FDT(fdt_property_cell(fdt, "msi-parent", PHANDLE_MSI)); generate_dma_region_prop(fdt); -- 2.34.1