lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1202011110180.3196@kaball-desktop>
Date:	Wed, 1 Feb 2012 11:18:51 +0000
From:	Stefano Stabellini <stefano.stabellini@...citrix.com>
To:	Konrad Rzeszutek Wilk <konrad@...nok.org>
CC:	Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>
Subject: Re: [Xen-devel] [PATCH v3] hvc_xen: implement multiconsole support

On Wed, 1 Feb 2012, Konrad Rzeszutek Wilk wrote:
> On Mon, Jan 30, 2012 at 04:02:31PM +0000, Stefano Stabellini wrote:
> > This patch implements support for multiple consoles:
> > consoles other than the first one are setup using the traditional xenbus
> > and grant-table based mechanism.
> > We use a list to keep track of the allocated consoles, we don't
> > expect too many of them anyway.
> >
> 
> So looks good. applied to #testing. How do I test "multiple" consoles?

Interesting question :)

First of all testing a pv console alongside an emulated serial is easy:
by default xl creates a pv console for all hvm guests. So you just need
to start using it (something like console=ttyS0 console=hvc0 on a PV on
HVM guest).
You can connect to the pv console with the following command:

xl console -t pv <domain_name>


Then, in order to test multiple pv consoles, you need the toolstack to
create more than one for you (see appended patch that creates 2 pv
consoles for PV on HVM guests). If you create two pv consoles, you can
connect to the second one with the following command:

xl console -t pv -n 1 <domain_name>

BTW in the patch below I am seeting QEMU as console backend because it
is the only one that can handle multiple pv consoles.


8<----

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index e1c615f..ec2c362 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -554,14 +554,21 @@ static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
     switch (d_config->c_info.type) {
     case LIBXL_DOMAIN_TYPE_HVM:
     {
-        libxl_device_console console;
+        libxl_device_console console, console2;
         libxl_device_vkb vkb;
 
         ret = init_console_info(&console, 0);
         if ( ret )
             goto error_out;
+        console.consback = LIBXL_CONSOLE_BACKEND_IOEMU;
         libxl__device_console_add(gc, domid, &console, &state);
         libxl_device_console_dispose(&console);
+        ret = init_console_info(&console2, 1);
+        if ( ret )
+            goto error_out;
+        console2.consback = LIBXL_CONSOLE_BACKEND_IOEMU;
+        libxl__device_console_add(gc, domid, &console2, NULL);
+        libxl_device_console_dispose(&console2);
 
         ret = libxl_device_vkb_init(ctx, &vkb);
         if ( ret )
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ