[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: default to xenconsoled for pv guests


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Mon, 14 May 2012 16:32:27 +0000
  • Delivery-date: Mon, 14 May 2012 16:32:36 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Campbell <Ian.Campbell@xxxxxxxxxx>
# Date 1336747972 -3600
# Node ID cb0da7656e4e7ca8a58e3e1a64dcb79c24231b7a
# Parent  7a6dcecb1781838c9f5d0e0a51c89a718f85c85d
libxl: default to xenconsoled for pv guests

Default to xenconsoled for pv guests, even if qemu is running.

Currently we prefer to use qemu for the disk backend if we are starting qemu
anyway (e.g. to service a disk).

Unfortunately qemu doesn't log the console, which xenconsoled can do via
XENCONSOLED_TRACE=guest. Since xenconsoled is also running anyway it seems like
there is no particular reason to prefer qemu just because it happens to be
running.

However we must use qemu if thereis more than one console (xenconsoled only
supports a single console).

Therefore push the logic to change the console backend down into
libxl__need_xenpv_qemu so that it can do the right thing.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r 7a6dcecb1781 -r cb0da7656e4e tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Wed Apr 25 12:55:57 2012 +0100
+++ b/tools/libxl/libxl_create.c        Fri May 11 15:52:52 2012 +0100
@@ -682,9 +682,6 @@ static int do_domain_create(libxl__gc *g
                 d_config->num_vfbs, d_config->vfbs,
                 d_config->num_disks, &d_config->disks[0]);
 
-        if (need_qemu)
-             console.consback = LIBXL__CONSOLE_BACKEND_IOEMU;
-
         libxl__device_console_add(gc, domid, &console, &state);
         libxl__device_console_dispose(&console);
 
diff -r 7a6dcecb1781 -r cb0da7656e4e tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Wed Apr 25 12:55:57 2012 +0100
+++ b/tools/libxl/libxl_dm.c    Fri May 11 15:52:52 2012 +0100
@@ -1095,7 +1095,13 @@ int libxl__need_xenpv_qemu(libxl__gc *gc
 {
     int i, ret = 0;
 
+    /*
+     * qemu is required in order to support 2 or more consoles. So switch all
+     * backends to qemu if this is the case
+     */
     if (nr_consoles > 1) {
+        for (i = 0; i < nr_consoles; i++)
+            consoles[i].consback = LIBXL__CONSOLE_BACKEND_IOEMU;
         ret = 1;
         goto out;
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.