From: Rahul Singh <rahul.singh@arm.com>
Current code skip the mapping for PCI bridge MMIO region to dom0 when
pci_passthrough_enabled flag is set. Mapping should be skip when
has_vpci(d) is enabled for the domain, as we need to skip the mapping
only when VPCI handler are registered for ECAM.
Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Acked-by: Julien Grall <jgrall@amazon.com>
---
This patch was originally picked up from [1]
v7->v8:
* no change
v6->v7:
* add Julien's A-b
v5->v6:
* drop unrelated change in xen/arch/arm/domain_build.c:handle_linux_pci_domain()
v4->v5:
* new patch
changes since picking up from [1]:
* rebase on top of "dynamic node programming using overlay dtbo" series
* replace !is_pci_passthrough_enabled() check with !IS_ENABLED(CONFIG_HAS_PCI)
instead of removing
[1] https://lists.xenproject.org/archives/html/xen-devel/2023-07/msg00483.html
---
xen/arch/arm/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c
index 5610cddcba..25847d60ee 100644
--- a/xen/arch/arm/device.c
+++ b/xen/arch/arm/device.c
@@ -268,7 +268,7 @@ int handle_device(struct domain *d, struct dt_device_node *dev, p2m_type_t p2mt,
.d = d,
.p2mt = p2mt,
.skip_mapping = !own_device ||
- (is_pci_passthrough_enabled() &&
+ (has_vpci(d) &&
(device_get_class(dev) == DEVICE_PCI_HOSTBRIDGE)),
.iomem_ranges = iomem_ranges,
.irq_ranges = irq_ranges
--
2.34.1