WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxenlight: fix multiple console with stubdoms

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxenlight: fix multiple console with stubdoms
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 30 Nov 2009 14:23:33 +0000
Delivery-date: Mon, 30 Nov 2009 06:20:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
libxenlight doesn't handle properly the multiple pv console case, needed
to support an emulated serial in hvm guests with stubdoms.
This patch fixes it.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

---

diff -r 6f9ea06417df tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Mon Nov 30 10:29:45 2009 +0000
+++ b/tools/libxl/libxl.c       Mon Nov 30 14:20:26 2009 +0000
@@ -741,8 +741,8 @@
                                 libxl_device_vkb *vkb,
                                 libxl_device_model_starting **starting_r)
 {
-    int i;
-    libxl_device_console console;
+    int i, num_console = 1;
+    libxl_device_console *console;
     libxl_domain_create_info c_info;
     libxl_domain_build_info b_info;
     libxl_domain_build_state state;
@@ -807,11 +807,19 @@
     vkb_info_domid_fixup(vkb, domid);
     libxl_device_vkb_add(ctx, domid, vkb);
 
-    init_console_info(&console, 0, &state);
-    console_info_domid_fixup(&console, domid);
-    console.constype = CONSTYPE_IOEMU;
-    libxl_device_console_add(ctx, domid, &console);
-    libxl_create_xenpv_qemu(ctx, vfb, 1, &console, starting_r);
+    if (info->serial)
+        num_console++;
+    console = libxl_calloc(ctx, num_console, sizeof(libxl_device_console));
+    for (i = 0; i < num_console; i++) {
+        if (!i)
+            init_console_info(&console[i], i, &state);
+        else
+            init_console_info(&console[i], i, NULL);
+        console_info_domid_fixup(&console[i], domid);
+        console[i].constype = CONSTYPE_IOEMU;
+        libxl_device_console_add(ctx, domid, &console[i]);
+    }
+    libxl_create_xenpv_qemu(ctx, vfb, num_console, console, starting_r);
 
     libxl_domain_unpause(ctx, domid);
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] libxenlight: fix multiple console with stubdoms, Stefano Stabellini <=