diff mbox series

[ImageBuilder,2/5] uboot-script-gen: Extend DOMU_ENHANCED to specify "no-xenstore"

Message ID 20240417120741.2453431-3-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>

We need some Xen services to be available within single dom0less DomU.
Just using "enabled" will lead to Xen panic because of no Dom0.

(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) At the moment, Xenstore support requires dom0 to be present
(XEN) ****************************************

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

Comments

Michal Orzel April 17, 2024, 12:27 p.m. UTC | #1
On 17/04/2024 14:07, Oleksandr Tyshchenko wrote:
> 
> 
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> 
> We need some Xen services to be available within single dom0less DomU.
> Just using "enabled" will lead to Xen panic because of no Dom0.
> 
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) At the moment, Xenstore support requires dom0 to be present
> (XEN) ****************************************
> 
> 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 3b4b16f..97db7aa 100644
--- a/README.md
+++ b/README.md
@@ -217,9 +217,10 @@  Where:
   If set to 1, the VM is direct mapped. The default is 1.
   This is only applicable when DOMU_STATIC_MEM is specified.
 
-- DOMU_ENHANCED[number] can be set to 1 or 0, default is 1 when Dom0 is
-  present. If set to 1, the VM can use PV drivers. Older Linux kernels
-  might break.
+- DOMU_ENHANCED[number] can be set to 0, 1, or 2. Default is 1 when Dom0
+  is present. If set to 1, the VM can use PV drivers. Older Linux
+  kernels might break. If set to 2, "no-xenstore" is specified, see Xen
+  documentation about dom0less "no-xenstore" option.
 
 - 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 7cb8c6d..98a64d6 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -348,6 +348,9 @@  function xen_device_tree_editing()
         if [[ "${DOMU_ENHANCED[$i]}" == 1 || ("$DOM0_KERNEL" && "${DOMU_ENHANCED[$i]}" != 0) ]]
         then
             dt_set "/chosen/domU$i" "xen,enhanced" "str" "enabled"
+        elif [ "${DOMU_ENHANCED[$i]}" == 2 ]
+        then
+            dt_set "/chosen/domU$i" "xen,enhanced" "str" "no-xenstore"
         fi
 
         if test -n "${DOMU_SHARED_MEM[i]}"