-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
1007-libxl-allow-kernel-cmdline-without-kernel-if-stubdom.patch
36 lines (32 loc) · 1.44 KB
/
1007-libxl-allow-kernel-cmdline-without-kernel-if-stubdom.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 0e1ec70e77d62a5f4149f6eca68f8c2239aa289b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Wed, 16 Nov 2022 01:45:25 +0100
Subject: [PATCH 1007/1018] libxl: allow kernel cmdline without kernel if
stubdomain is used
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Qubes's stubdomain gets the kernel (and initramfs) on a block device for
direct kernel boot. Allow using standard method of passing kernel
cmdline in this case too.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
tools/libs/light/libxl_create.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
index e23d3c866feb..d9937f5edc25 100644
--- a/tools/libs/light/libxl_create.c
+++ b/tools/libs/light/libxl_create.c
@@ -182,7 +182,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
/* Check HVM direct boot parameters, we should honour ->ramdisk and
* ->cmdline iff ->kernel is set.
*/
- if (!b_info->kernel && (b_info->ramdisk || b_info->cmdline)) {
+ if (!b_info->kernel && (b_info->ramdisk || (b_info->cmdline &&
+ !libxl_defbool_val(b_info->device_model_stubdomain)))) {
LOG(ERROR, "direct boot parameters specified but kernel missing");
return ERROR_INVAL;
}
--
2.37.3