-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy path1012-libxl-add-qubes-gui-graphics.patch
86 lines (81 loc) · 3.61 KB
/
1012-libxl-add-qubes-gui-graphics.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
73
74
75
76
77
78
79
80
81
82
83
84
85
From 24afae20152a98298fa196eb54ddbff5b62d525a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
Date: Wed, 16 Nov 2022 01:52:34 +0100
Subject: [PATCH] libxl: add qubes-gui graphics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
---
tools/libs/light/libxl_create.c | 12 ++++++++++++
tools/libs/light/libxl_dm.c | 7 +++++++
tools/libs/light/libxl_types.idl | 8 ++++++++
3 files changed, 27 insertions(+)
diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
index 1d43725d5eed..0ed0d026de2e 100644
--- a/tools/libs/light/libxl_create.c
+++ b/tools/libs/light/libxl_create.c
@@ -429,6 +429,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 ed2772ab0456..4710ded5deec 100644
--- a/tools/libs/light/libxl_dm.c
+++ b/tools/libs/light/libxl_dm.c
@@ -1720,6 +1720,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 4e65e6fda5f1..1ad4d8dd1d3f 100644
--- a/tools/libs/light/libxl_types.idl
+++ b/tools/libs/light/libxl_types.idl
@@ -354,6 +354,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),
@@ -699,6 +706,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
("rdm_mem_boundary_memkb", MemKB),
("mca_caps", uint64),
("pirq", libxl_defbool),
+ ("qubes_gui", libxl_qubes_gui_info),
])),
("pv", Struct(None, [("kernel", string, {'deprecated_by': 'kernel'}),
("slack_memkb", MemKB),
--
2.44.0