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

[PATCH v11 5/7] xen/arm: Fix mapping for PCI bridge mmio region


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Wed, 28 May 2025 09:12:17 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2hJipxXtGS84tqPWWkGQID4DWS/WfVqz4LfOOuxpUoY=; b=xZ2NVzpRHCOhl6GV3vyj8G8moJXTdyqiLZ2zCgSaFwFtl9SUmYKmpWN8Ky6FPm/mBtyN3VSel5cBpcKJbVIfD7wluvoTpu6Ko1q9PHwlmwI7YY4L91IhkjSXMXlJS0E07LmOEKxpiQ+P7yI3L3dBQiFxu5OIhGSjSa2NcKuQ+wxd+KFVro7XARsaSaoXFOASiaaJFycpHofenX5HWm+HdeHjOozuR5MOqKGwrRv+iXgswke0N6/H5nHHUvCLLAZ/c/H1/7fELQxAq73JVdgWI4K7sihIO3wDBZijcxMCpXqCaDAda/NXvW7DoQEEaxvC4oRekELMdB8xQ+8ioRhcgQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZFN5DZovh7IEAGJJ1pjeE5TUtHID5rFNren6IHyw3Y7LByhgx8xrmrhXrW3lWQ74hkAjXnYGvHIHKik0ONZEM5Eq0GgibNtuGdF+zAsGdgUIVwSapeXwURqgzxR1L2FhIgxQU6nYTAno/JnGN/m6Ghi2CbAU7OT3oheTfgxwb/Rlw9NlPB9UQEhtURMIQ6y31Sy13GQtu+D5GRqyluX5yqddFFdDIhkJVpYUSSAxyFl8AUW7UCswxxn6WBBovOQfhhgyxOTd0iUfSzju6PCx8xWJcA1AcnOCHlERjxWFAVrs1MMmio0scgNqfQXvbMLU31HmGQWZzU0jeRYbQ9q/LA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • 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>, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Wed, 28 May 2025 09:12:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHbz7CcY3xN8amw40aBS5pduG3+AQ==
  • Thread-topic: [PATCH v11 5/7] xen/arm: Fix mapping for PCI bridge mmio region

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>
Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
---
This patch was originally picked up from [1]

v10->v11:
* no change

v9->v10:
* no change

v8->v9:
* no change

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 5e1c1cc326..11523750ae 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



 


Rackspace

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