From 648a85038f7673d028cd9d345db9192d1cb62915 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Thu, 28 Jul 2022 16:50:31 -0700 Subject: Add a DOMU_ENHANCED config option The new option allows to disable "xen,enhanced" for individual domUs. Useful to boot old unpatched kernels. Signed-off-by: Stefano Stabellini --- README.md | 4 ++++ scripts/uboot-script-gen | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 07ad432..bd9dac9 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,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. + - 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 995798d..18c0ce1 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -222,7 +222,7 @@ function xen_device_tree_editing() dt_set "/chosen/domU$i" "direct-map" "bool" "${DOMU_DIRECT_MAP[$i]}" fi dt_set "/chosen/domU$i" "vpl011" "hex" "0x1" - if test "$DOM0_KERNEL" + if [[ "${DOMU_ENHANCED[$i]}" == 1 || ("$DOM0_KERNEL" && "${DOMU_ENHANCED[$i]}" != 0) ]] then dt_set "/chosen/domU$i" "xen,enhanced" "str" "enabled" fi -- cgit v1.2.3