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

[PATCH v12 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, 2 Jul 2025 07:10:02 +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=a0fIYyRtrGDYb2inwj/9c0Fm/wGYo8/Q2HKicoq4Zks=; b=WfcRrVFzS35TwdN1EGi4JbgbMLgaQ3+waO5/c+Mnxg0wgpRh4y5iTiptNZ+aE0HRpUAZyMFJAewoBUgpmkM0rtOg+0a+GpPHxDE2jrpVribJJVq6LFmtdRH8vgUMeC/6sra/A0RKMfovBC5xJYliGi9DkBL0tk01gvbvwisVZFYbvXdQPVr59gbtt/M874dfSAz8yhqb081iGwsZXiGXvDW8Zz/f+OFUvPe6kTlDC+RXImslf9ezpQgHGb7R1UF91Kq1tNXfj0uGWqVOzebLxnSGWjdf3B6aUAvZVr0di7VEksJ4sDuSxFLfLW3VnzQ1uXTtW5Z96pgILffc76rHSQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FiZ9JIqc5ZS6kmGJbiRFRmiUEDLDdtpqGTCo8iJZM3ddhiBIKVD+2RGu1R/lAt0ZOYk6OIyMDA6ovKu2Nzdc7Sdw3MTp9Ofh3VcK9Lm7gfRCml8NpDbdksVsxRxvdFk6iv+9PFhFxOMne0nWBN7tAe/1N8KlPvdNrCoRQbd4HKcwG45StG8ONP6L2LeFrZKrGgpRYLY0OZvzZPXolLjWW39Nb2dqFVCFZXvN1cyOqzS5M4VRozMYBQUdMwdRfpH0dWr4jCHFaUETTN9c2L6PS0pvfaPjw6Pqu14fW4rlFb0nrsUGRe7x3GJImkq5mLevpFi9b4ehk/bt3M0voAgQOg==
  • 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, 02 Jul 2025 07:10:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHb6yBUi/XpEQ96bkGJlOgGIbY7rg==
  • Thread-topic: [PATCH v12 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]

v11->v12:
* no change

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®.