|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |