From: Jan Kiszka <[email protected]> If the system config contains a pci_domain value in the range 0..0xfffe, expose this value via the linux,pci-domain property to the guest so that the virtual controller will get a fixed domain number.
Signed-off-by: Jan Kiszka <[email protected]> --- driver/pci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/driver/pci.c b/driver/pci.c index 0e7a4205c..c0957d3cf 100644 --- a/driver/pci.c +++ b/driver/pci.c @@ -341,6 +341,19 @@ static bool create_vpci_of_overlay(struct jailhouse_system *config) if (!vpci_node) goto out; + if (config->platform_info.pci_domain != (u16)-1) { + prop = alloc_prop("linux,pci-domain", sizeof(u32)); + if (!prop) + goto out; + + prop_val = prop->value; + prop_val[0] = cpu_to_be32(config->platform_info.pci_domain); + + if (of_changeset_add_property(&overlay_changeset, vpci_node, + prop) < 0) + goto out; + } + prop = alloc_prop("interrupt-map", sizeof(u32) * (8 + gic_address_cells) * 4); if (!prop) -- 2.13.6 -- 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]. For more options, visit https://groups.google.com/d/optout.
