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

[ImageBuilder][PATCH] uboot-script-gen: Add support for "passthrough" property


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Mon, 1 Dec 2025 11:34:04 +0000
  • Accept-language: en-US, ru-RU
  • 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=kY+sMmVl54NGo+Pk5wX1Z0fiWE7PBAn7tS4jA5GOxVs=; b=Ewwq7VOBKzVpEP3/SfC14ZR40ZiWcAscht2T0AZL+cx/l8v2nkSY3usAIvxG6ATwLLelHfKRQC/iNDyPwjEwE0HGPWaHm/5LhM026tiHJk2hJQQ9EeiPcJmcURezMk9bVnO6XTaf+byvT8YddbV8b7FnGJDxUP/5/8pWxdMBKEQSCLxKNWLz9S4RhrKwQ88hjXuqkVNn1+UP4b8EPI3QUE6Ro4V1v1KHGtdWvL2ihtvsMKObEHXnsAUIezqNnN0XgFlcOULnb57tg9t7ZP2DM/mYyD3YsJ+5NWDP9M0dn6mdlLQUaYnB7aRMiInEevY147cHCWquZ1X/pfKPquAn9A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Tth1eWm0dDDYzRC0HAe4x6hs2Xt6o2QmbhTQOr/86zeZuQaZ7AIrR47j8nVDBp4qCV30D6dIQ4ZeEE87W1zerX3f4RkA8KPiEBD4TyKH9EInKoYKy1upucdZOekA1tuS+M2RdljmBUwJWc/KmcPKhsv3wbHKOcmV9b3frNXatAkEotSdjjX7Y5lPWxz3OlvHMbapY5YmyR+KWutKeuFTvrq/sGdsFStu5JrVlr1JVMILZMkVcArIEdkcRmlfGduvs9sAacyvfoh+zQvzboDu2L4EVr9q4J6pumYwJkw8k6bk1+SPqBaOVWCy2Ej4pI6gNLUqNqi7dTZI1T7Cy/Ec1w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Ayan Kumar Halder <ayankuma@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Mon, 01 Dec 2025 11:34:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcYrZlLhWjOcFOMESo6Ja5HoKvcA==
  • Thread-topic: [ImageBuilder][PATCH] uboot-script-gen: Add support for "passthrough" property

This property is used to grant a non-hardware domain
permission to use the IOMMU, which is a prerequisite
for device passthrough.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
---
 README.md                | 6 ++++++
 scripts/uboot-script-gen | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/README.md b/README.md
index 0063747..983cbbc 100644
--- a/README.md
+++ b/README.md
@@ -338,6 +338,12 @@ Where:
       assigned to a regular DomU.
     - An explicit non-zero ID cannot be assigned to the hardware domain itself.
 
+- DOMU_PASSTHROUGH_PROP[number] is optional string used to permit a 
non-hardware
+  domain to use the IOMMU, which is a prerequisite for device passthrough.
+  If set to "enabled", the passthrough = "enabled"; property is added to
+  the domain's device tree node. This option has no effect if the IOMMU is not
+  active.
+
 - LINUX is optional but specifies the Linux kernel for when Xen is NOT
   used.  To enable this set any LINUX\_\* variables and do NOT set the
   XEN variable.
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index 78a731d..d18ac55 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -509,6 +509,11 @@ function xen_device_tree_editing()
             dt_set "/chosen/domU$i" "domid" "int" "${DOMU_DOMID[$i]}"
         fi
 
+        if test "${DOMU_PASSTHROUGH_PROP[$i]}" = "enabled"
+        then
+            dt_set "/chosen/domU$i" "passthrough" "str" "enabled"
+        fi
+
         if test -n "${DOMU_SHARED_MEM[i]}"
         then
             add_device_tree_static_shared_mem "/chosen/domU${i}" 
"${DOMU_SHARED_MEM[i]}"
-- 
2.34.1



 


Rackspace

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