forked from QubesOS/qubes-vmm-xen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch-stubdom-linux-config-qubes-gui.patch
72 lines (68 loc) · 3.01 KB
/
patch-stubdom-linux-config-qubes-gui.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-----------
diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
index 35aebb9f..659f3706 100644
--- a/tools/libs/light/libxl_create.c
+++ b/tools/libs/light/libxl_create.c
@@ -417,6 +417,18 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
libxl_defbool_setdefault(&b_info->u.hvm.sdl.opengl, false);
}
+ libxl_defbool_setdefault(&b_info->u.hvm.qubes_gui.enable, false);
+ if (libxl_defbool_val(b_info->u.hvm.qubes_gui.enable)) {
+ if (b_info->u.hvm.qubes_gui.domname) {
+ if (libxl__resolve_domid(gc,
+ b_info->u.hvm.qubes_gui.domname,
+ &b_info->u.hvm.qubes_gui.domid) < 0) {
+ LOG(ERROR, "Qubes GUI domain not found.");
+ return ERROR_INVAL;
+ }
+ }
+ }
+
if (libxl_defbool_val(b_info->u.hvm.spice.enable)) {
libxl_defbool_setdefault(&b_info->u.hvm.spice.disable_ticketing,
false);
diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c
index 75340ff1..424a955d 100644
--- a/tools/libs/light/libxl_dm.c
+++ b/tools/libs/light/libxl_dm.c
@@ -1703,6 +1703,13 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
flexarray_append(dm_args, "-net");
flexarray_append(dm_args, "none");
}
+
+ if (libxl_defbool_val(b_info->u.hvm.qubes_gui.enable)) {
+ flexarray_append_pair(dm_args, "-display",
+ GCSPRINTF("qubes-gui,domid=%u,log-level=%i",
+ b_info->u.hvm.qubes_gui.domid,
+ b_info->u.hvm.qubes_gui.log_level));
+ }
} else {
if (!sdl && !vnc) {
flexarray_append(dm_args, "-nographic");
diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_types.idl
index 2a42da2f..211a2f47 100644
--- a/tools/libs/light/libxl_types.idl
+++ b/tools/libs/light/libxl_types.idl
@@ -331,6 +331,13 @@ libxl_sdl_info = Struct("sdl_info", [
("xauthority", string),
])
+libxl_qubes_gui_info = Struct("qubes_gui_info", [
+ ("enable", libxl_defbool),
+ ("domid", libxl_domid),
+ ("domname", string),
+ ("log_level", integer),
+ ])
+
libxl_dominfo = Struct("dominfo",[
("uuid", libxl_uuid),
("domid", libxl_domid),
@@ -624,6 +631,8 @@ libxl_domain_build_info = Struct("domain_build_info",[
("rdm", libxl_rdm_reserve),
("rdm_mem_boundary_memkb", MemKB),
("mca_caps", uint64),
+
+ ("qubes_gui", libxl_qubes_gui_info),
])),
("pv", Struct(None, [("kernel", string, {'deprecated_by': 'kernel'}),
("slack_memkb", MemKB),
-----------------