[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v6 7/9] xen/arm: Fix mapping for PCI bridge mmio region


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Thu, 9 Nov 2023 13:27:10 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lBl/mT4Fp4+iCx8kQINOf/6N5HM+ggw/1Xmyu+udaKU=; b=YArZ0oeLwGVfZiPSFpB6iHgrpuKgV2Fmiw5pYDeUZw6XFHJl5nQJTc5jnpimr1PbBjc62OKbB3WY59HiQw/vmc8FX9jIrnmkJpNwsKDrlrxdPbC41Z/6fol7h2zFv5EUCVWOU0BlaOPL2vVWyreMvnVXHRTDyPVYhDbj1JxGUEGZ02CFXta/2LR5hC0tRutsLzQlvu6yZUn41BqUsMgsMBrgEobbcpfM0c2Z2jlILlc/EoxkIjfwNmSoxL2ui0HauJPkoxGtcF8ov+rl0z0NVwpEfyW/ITVTPMt4S62vBJpyApLg4mjgU8sMEdkqnYREr1kCXLcfDdkrcYR2e+tpsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=muPLhG00j+C5DyDwlNP2vwsD54DXvQQj6OLKKeT37EiqF+0NSO13EvudA0N//Opb/6UmbFh70CordTaBAVJEzUZ/XwCYVy0ziDPyxaFhBr05aa6pb1lAVV/8XojY4eILPgfCGGJVjetPCMTUWFdBkqsflBnhOBhb0i6Xf0aAFerpQF88+S18a2hqL9rEswqyeSAEAwBgCHV/RXIyzcKact1y21XrAxAarK2qErXxEqIZnfnGBqM96yvfpEbxfkcaxDtMoQcVlry4KpklRcl/Q+Qu7fMEL2hUs5rGDIis+4lu/lCnHtYNEx5HlIMSOcAeBOuoiYbf40OKvMH7VFh/cA==
  • Cc: Rahul Singh <rahul.singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Delivery-date: Thu, 09 Nov 2023 18:29:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Rahul Singh <rahul.singh@xxxxxxx>

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@xxxxxxx>
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
This patch was originally picked up from [1]

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 1f631d327441..4d69c298858d 100644
--- a/xen/arch/arm/device.c
+++ b/xen/arch/arm/device.c
@@ -330,7 +330,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.42.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.