xen/arm: add pci-domain for disabled devices
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Thu, 9 Dec 2021 07:29:15 +0000 (09:29 +0200)
committerJulien Grall <jgrall@amazon.com>
Wed, 15 Dec 2021 17:34:58 +0000 (17:34 +0000)
commit1050a7b91c2ef8d102b5d216ed3d12cdb6067f60
treece3ccaa4151fae30abd54f543cc8ce1269f48512
parent8b3cbdbe782cae972e9a47cf22620ebee61a96a6
xen/arm: add pci-domain for disabled devices

If a PCI host bridge device is present in the device tree, but is
disabled, then its PCI host bridge driver was not instantiated.
This results in the failure of the pci_get_host_bridge_segment()
and the following panic during Xen start:

(XEN) Device tree generation failed (-22).
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Could not set up DOM0 guest OS
(XEN) ****************************************

Fix this by adding "linux,pci-domain" property for all device tree nodes
which have "pci" device type, so we know which segments will be used by
the guest for which bridges.

Fixes: 4cfab4425d39 ("xen/arm: Add linux,pci-domain property for hwdom if not available.")
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/domain_build.c
xen/arch/arm/include/asm/pci.h
xen/arch/arm/pci/pci-host-common.c