diff mbox series

[ImageBuilder,3/5] uboot-script-gen: Add ability to specify grant table params

Message ID 20240417120741.2453431-4-olekstysh@gmail.com (mailing list archive)
State New
Headers show
Series Misc updates for the dom0less support | expand

Commit Message

Oleksandr Tyshchenko April 17, 2024, 12:07 p.m. UTC
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

Use DOMU_GRANT_VER to set "max_grant_version" dt property.
Use DOMU_GRANT_FRAMES to set "max_grant_frames" dt property.
Use DOMU_MAPTRACK_FRAMES to set "max_maptrack_frames" dt property.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
---
 README.md                | 10 ++++++++++
 scripts/uboot-script-gen | 13 +++++++++++++
 2 files changed, 23 insertions(+)

Comments

Michal Orzel April 17, 2024, 12:28 p.m. UTC | #1
On 17/04/2024 14:07, Oleksandr Tyshchenko wrote:
> 
> 
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> 
> Use DOMU_GRANT_VER to set "max_grant_version" dt property.
> Use DOMU_GRANT_FRAMES to set "max_grant_frames" dt property.
> Use DOMU_MAPTRACK_FRAMES to set "max_maptrack_frames" dt property.
> 
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>

~Michal
diff mbox series

Patch

diff --git a/README.md b/README.md
index 97db7aa..b2459fd 100644
--- a/README.md
+++ b/README.md
@@ -222,6 +222,16 @@  Where:
   kernels might break. If set to 2, "no-xenstore" is specified, see Xen
   documentation about dom0less "no-xenstore" option.
 
+- DOMU_GRANT_VER[number] is optional but specifies the maximum version
+  of grant table shared structure (the maximum security supported version
+  by Xen on Arm64 is 1)
+
+- DOMU_GRANT_FRAMES[number] is optional but specifies the maximum number
+  of grant table frames (the default value used by Xen on Arm64 is 64)
+
+- DOMU_MAPTRACK_FRAMES[number] is optional but specifies the maximum number
+  of grant maptrack frames (the default value used by Xen on Arm64 is 1024)
+
 - DOMU_CPUPOOL[number] specifies the id of the cpupool (created using
   CPUPOOL[number] option, where number == id) that will be assigned to domU.
 
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index 98a64d6..adec6f9 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -353,6 +353,19 @@  function xen_device_tree_editing()
             dt_set "/chosen/domU$i" "xen,enhanced" "str" "no-xenstore"
         fi
 
+        if test -n "${DOMU_GRANT_VER[i]}"
+        then
+            dt_set "/chosen/domU$i" "max_grant_version" "int" "${DOMU_GRANT_VER[i]}"
+        fi
+        if test -n "${DOMU_GRANT_FRAMES[i]}"
+        then
+            dt_set "/chosen/domU$i" "max_grant_frames" "int" "${DOMU_GRANT_FRAMES[i]}"
+        fi
+        if test -n "${DOMU_MAPTRACK_FRAMES[i]}"
+        then
+            dt_set "/chosen/domU$i" "max_maptrack_frames" "int" "${DOMU_MAPTRACK_FRAMES[i]}"
+        fi
+
         if test -n "${DOMU_SHARED_MEM[i]}"
         then
             add_device_tree_static_shared_mem "/chosen/domU${i}" "${DOMU_SHARED_MEM[i]}"