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-changelog

[Xen-changelog] [xen-unstable] libxenlight: fix multiple console with st

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxenlight: fix multiple console with stubdoms
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 01 Dec 2009 06:30:25 -0800
Delivery-date: Tue, 01 Dec 2009 06:30:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259674450 0
# Node ID 1a6a109e48cef8920e2619ecef3c0d69b218d827
# Parent  bd52fff29e6e5d45331a7cef7927c628413e7def
libxenlight: fix multiple console with stubdoms

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>
---
 tools/libxl/libxl.c |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff -r bd52fff29e6e -r 1a6a109e48ce tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Mon Nov 30 11:48:36 2009 +0000
+++ b/tools/libxl/libxl.c       Tue Dec 01 13:34:10 2009 +0000
@@ -738,8 +738,8 @@ static int libxl_create_stubdom(struct l
                                 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;
@@ -804,11 +804,19 @@ retry_transaction:
     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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxenlight: fix multiple console with stubdoms, Xen patchbot-unstable <=