[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 6/6] xen/arm: dom0less: Add a background PCI ECAM mmio region
From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxx> Add a background PCI ECAM mmio region always reading as all ones. This indicates to the OS that there are no PCI devices on the bus. Once the device-model's IOREQ client connects, the OS can rescan the bus and find PV and emulated devices. This avoids a race where domU's come up before the device models, causing domU to crash into a data-abort when accessing ECAM. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxx> --- xen/arch/arm/dom0less-build.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index dab24fa9e2..bc5285e7fa 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -1015,6 +1015,16 @@ static int __init construct_domU(struct domain *d, kinfo.virtio_pci.mem.base = GUEST_VIRTIO_PCI_MEM_BASE; kinfo.virtio_pci.pf_mem.base = GUEST_VIRTIO_PCI_PREFETCH_MEM_BASE; } + + /* + * Register a background PCI ECAM region returning ~0. This indicates + * to the OS that there are no PCI devices on the bus. Once an IOREQ + * client connects, the OS can rescan the bus and find devices. + */ + register_mmio_bg_handler(d, true, &mmio_read_const_writes_ignored, + kinfo.virtio_pci.ecam.base, + GUEST_VIRTIO_PCI_ECAM_SIZE, + (void *) ULONG_MAX); } rc = dt_property_read_string(node, "xen,enhanced", &dom0less_enhanced); -- 2.43.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |