@@ -7,9 +7,9 @@ LONG DESCRIPTION:
77# ###############################################################################
88This patch contains several changes that couldn't be grouped elsewhere. These
99changes support running xl on OpenXT with xenmgr as the toplevel toolstack
10- component. Some of the changes include tweaking qemu options, reworking the
11- vfb/vkb initialization, and writing OpenXT specific xenstore nodes. Refer
12- to the patch below for a comprehensive list of changes.
10+ component. Some of the changes include tweaking qemu options, and writing
11+ OpenXT specific xenstore nodes. Refer to the patch below for a comprehensive
12+ list of changes.
1313
1414# ###############################################################################
1515CHANGELOG
@@ -46,33 +46,7 @@ PATCHES
4646 int libxl_domain_sleep(libxl_ctx *ctx, uint32_t domid);
4747--- a/tools/libxl/libxl_create.c
4848+++ b/tools/libxl/libxl_create.c
49- @@ -1435,17 +1435,12 @@ static void domcreate_launch_dm(libxl__e
50- {
51- libxl__device_console console;
52- libxl__device device;
53- - libxl_device_vkb vkb;
54-
55- init_console_info(gc, &console, 0);
56- console.backend_domid = state->console_domid;
57- libxl__device_console_add(gc, domid, &console, state, &device);
58- libxl__device_console_dispose(&console);
59-
60- - libxl_device_vkb_init(&vkb);
61- - libxl__device_add(gc, domid, &libxl__vkb_devtype, &vkb);
62- - libxl_device_vkb_dispose(&vkb);
63- -
64- dcs->sdss.dm.guest_domid = domid;
65- if (libxl_defbool_val(d_config->b_info.device_model_stubdomain))
66- libxl__spawn_stub_dm(egc, &dcs->sdss);
67- @@ -1485,23 +1480,17 @@ static void domcreate_launch_dm(libxl__e
68- libxl__device_console_dispose(&vuart);
69- }
70-
71- + /* Disable QEMU for PV guests. */
72- + ret = 0;
73- +
74- init_console_info(gc, &console, 0);
75- console.backend_domid = state->console_domid;
49+ @@ -1490,18 +1490,11 @@ static void domcreate_launch_dm(libxl__e
7650 libxl__device_console_add(gc, domid, &console, state, &device);
7751 libxl__device_console_dispose(&console);
7852
@@ -88,6 +62,8 @@ PATCHES
8862- domcreate_devmodel_started(egc, &dcs->sdss.dm, 0);
8963- return;
9064- }
65+ + /* Disable QEMU for PV guests. */
66+ +
9167+ assert(!dcs->sdss.dm.guest_domid);
9268+ domcreate_devmodel_started(egc, &dcs->sdss.dm, 0);
9369+ return;
@@ -189,115 +165,6 @@ PATCHES
189165
190166 return 0;
191167 }
192- --- a/tools/xl/xl_parse.c
193- +++ b/tools/xl/xl_parse.c
194- @@ -1229,8 +1229,9 @@ void parse_config_data(const char *confi
195- {
196- const char *buf;
197- long l, vcpus = 0;
198- + long vkb_flag, vfb_flag;
199- XLU_Config *config;
200- - XLU_ConfigList *cpus, *vbds, *nics, *pcis, *cvfbs, *cpuids, *vtpms,
201- + XLU_ConfigList *cpus, *vbds, *nics, *pcis, *cpuids, *vtpms,
202- *usbctrls, *usbdevs, *p9devs, *vdispls, *pvcallsifs_devs;
203- XLU_ConfigList *channels, *ioports, *irqs, *iomem, *viridian, *dtdevs,
204- *mca_caps;
205- @@ -2222,64 +2223,38 @@ skip_nic:
206- fprintf(stderr, "WARNING: vif2: netchannel2 is deprecated and not supported by xl\n");
207- }
208-
209- - d_config->num_vfbs = 0;
210- - d_config->num_vkbs = 0;
211- - d_config->vfbs = NULL;
212- - d_config->vkbs = NULL;
213- -
214- - if (!xlu_cfg_get_list (config, "vfb", &cvfbs, 0, 0)) {
215- - while ((buf = xlu_cfg_get_listitem (cvfbs, d_config->num_vfbs)) != NULL) {
216- - libxl_device_vfb *vfb;
217- - libxl_device_vkb *vkb;
218- -
219- - char *buf2 = strdup(buf);
220- - char *p, *p2;
221- -
222- - vfb = ARRAY_EXTEND_INIT(d_config->vfbs, d_config->num_vfbs,
223- - libxl_device_vfb_init);
224- -
225- - vkb = ARRAY_EXTEND_INIT(d_config->vkbs, d_config->num_vkbs,
226- - libxl_device_vkb_init);
227- -
228- - p = strtok(buf2, ",");
229- - if (!p)
230- - goto skip_vfb;
231- - do {
232- - while (*p == ' ')
233- - p++;
234- - if ((p2 = strchr(p, '=')) == NULL)
235- - break;
236- - *p2 = '\0';
237- - if (!strcmp(p, "vnc")) {
238- - libxl_defbool_set(&vfb->vnc.enable, atoi(p2 + 1));
239- - } else if (!strcmp(p, "vnclisten")) {
240- - free(vfb->vnc.listen);
241- - vfb->vnc.listen = strdup(p2 + 1);
242- - } else if (!strcmp(p, "vncpasswd")) {
243- - free(vfb->vnc.passwd);
244- - vfb->vnc.passwd = strdup(p2 + 1);
245- - } else if (!strcmp(p, "vncdisplay")) {
246- - vfb->vnc.display = atoi(p2 + 1);
247- - } else if (!strcmp(p, "vncunused")) {
248- - libxl_defbool_set(&vfb->vnc.findunused, atoi(p2 + 1));
249- - } else if (!strcmp(p, "keymap")) {
250- - free(vfb->keymap);
251- - vfb->keymap = strdup(p2 + 1);
252- - } else if (!strcmp(p, "sdl")) {
253- - libxl_defbool_set(&vfb->sdl.enable, atoi(p2 + 1));
254- - } else if (!strcmp(p, "opengl")) {
255- - libxl_defbool_set(&vfb->sdl.opengl, atoi(p2 + 1));
256- - } else if (!strcmp(p, "display")) {
257- - free(vfb->sdl.display);
258- - vfb->sdl.display = strdup(p2 + 1);
259- - } else if (!strcmp(p, "xauthority")) {
260- - free(vfb->sdl.xauthority);
261- - vfb->sdl.xauthority = strdup(p2 + 1);
262- - }
263- - } while ((p = strtok(NULL, ",")) != NULL);
264- + //Support adding vkbs by themselves
265- + if (!xlu_cfg_get_long (config, "vkb", &vkb_flag, 0)){
266- + d_config->num_vkbs = 0;
267- + d_config->vkbs = NULL;
268- +
269- + if (vkb_flag == 1) {
270- + for(i = 0; i < 2; i++) {
271- + libxl_device_vkb *vkb;
272- + fprintf(stderr, "WARNING: init vkb device\n");
273- + d_config->vkbs = (libxl_device_vkb *) realloc(d_config->vkbs, sizeof(libxl_device_vkb) * (d_config->num_vkbs + 1));
274- + vkb = d_config->vkbs + d_config->num_vkbs;
275- + libxl_device_vkb_init(vkb);
276- + vkb->devid = d_config->num_vkbs;
277- + fprintf(stderr, "WARNING: vkb device of devid %d created.\n", vkb->devid);
278- + d_config->num_vkbs++;
279- + }
280- + }
281- + }
282-
283- - skip_vfb:
284- - free(buf2);
285- + if (!xlu_cfg_get_long (config, "vfb", &vfb_flag, 0)) {
286- + d_config->num_vfbs = 0;
287- + d_config->vfbs = NULL;
288- +
289- + if (vfb_flag == 1) {
290- + libxl_device_vfb * vfb;
291- + fprintf(stderr, "WARNING: init vfb device\n");
292- + d_config->vfbs = (libxl_device_vfb *) realloc(d_config->vfbs, sizeof(libxl_device_vfb) * (d_config->num_vfbs + 1));
293- + vfb = d_config->vfbs + d_config->num_vfbs;
294- + libxl_device_vfb_init(vfb);
295- + vfb->devid = d_config->num_vfbs;
296- + fprintf(stderr, "WARNING: vfb device of devid %d created.\n", vfb->devid);
297- + d_config->num_vfbs++;
298- }
299- }
300-
301168--- a/tools/xl/xl_vmcontrol.c
302169+++ b/tools/xl/xl_vmcontrol.c
303170@@ -109,7 +109,7 @@ int main_destroy(int argc, char **argv)
0 commit comments